向仪表板添加图像、视频等Add images, videos, and more to your dashboard

通过向仪表板添加磁贴,可在仪表板上放置图像、文本框、视频、流数据或 Web 代码。By adding a tile to your dashboard, you can place an image, text box, video, streaming data, or web code on your dashboard.

观看 Amanda 向仪表板添加磁贴的视频。Watch Amanda add tiles to a dashboard.

添加图像、视频或其他磁贴Add an image, video, or other tile

你可以直接向仪表板添加图像、文本框、视频、流数据或 Web 代码。You can add an image, text box, video, streaming data, or web code directly to your dashboard.

  1. 从仪表板的顶部菜单栏中选择“添加磁贴” 。Select Add tile from the top menu bar of your dashboard. 鉴于空间限制,你可能只能看到加号符号。Depending on space limitations, you may see only the plus plus sign sign.

    添加磁贴图标

  2. 选择要添加的磁贴类型:Select which type of tile to add:

    Web 内容Web content

    图像Image

    文本框Text box

    视频Video

    自定义流数据Custom streaming data

    添加磁贴窗口

添加图像Add an image

如果要向仪表板添加公司徽标或一些其他图像,可以在线保存图像文件并链接到该图像文件。If you want to add your company logo or some other image to your dashboard, you save the image file online and link to it. 请确保访问该图像文件无需安全凭据。Make sure security credentials aren't required to access the image file. 例如,OneDrive 和 SharePoint 需要身份验证,因此存储在该处的图像将无法按此种方式添加到仪表板。For example, because OneDrive and SharePoint require authentication, images stored there can't be added to a dashboard this way.

  1. 在“添加磁贴”窗口中,选择“图像” > “下一步” 。From the Add tile window, select Image > Next.

  2. 从“添加图像磁贴”窗口中,添加图像信息 :From the Add image tile window, add the image information:

    a.a. 要在图像上方显示标题,请选择“显示标题和副标题”,然后输入“标题”和可选的“副标题” 。To display a title above the image, select Display title and subtitle and enter a Title and an optional Subtitle.

    b.b. 输入图像 URL 。Enter the image URL.

    c.c. 要将磁贴设置为超链接,请选择“设置自定义链接”,并输入 URL 。To make the tile a hyperlink, select Set custom link and enter the URL.

    当同事单击此图像或标题时,便会前往此 URL。When colleagues click the image or title, they'll be taken to this URL.

    d.d. 选择应用Select Apply.

    添加图像磁贴窗口

  3. 在仪表板上,根据需要重设图像大小和移动图像。On the dashboard, resize and move the image as needed.

    仪表板上的图像

添加文本框或仪表板标题Add a text box or dashboard heading

若要添加仪表板标题,请在文本框中键入标题并增大字体。To add a dashboard heading, type your heading in the text box and increase the font.

  1. 在“添加磁贴”窗口中,选择“文本框” > “下一步” 。From the Add tile window, select Text box > Next.

  2. 设置文本框格式:Format the text box:

    a.a. 要在文本框上方显示标题,请选择“显示标题和副标题”,然后输入“标题”和可选的“副标题” 。To display a title above the text box, select Display title and subtitle and enter a Title and an optional Subtitle.

    b.b. 输入并格式化文本框的“内容” 。Enter and format Content for the text box.

    c.c. (可选)设置标题的自定义链接。Optionally, set a custom link for the title. 自定义链接可以是外部站点,或工作区中的仪表板或报表。A custom link can be an external site or a dashboard or report in your workspace. 不过在本例中,我们已经在文本框内添加了超链接,因此请保持“设置自定义链接”的未选中状态 。However, in this example we've added hyperlinks within the text box itself, so we'll leave Set custom link unchecked.

    d.d. 选择应用Select Apply.

    添加文本框磁贴窗口

  3. 在仪表板上,根据需要重设文本框大小和移动文本框。On the dashboard, resize and move the text box as needed.

    包含图像和文本框的仪表板

添加视频Add a video

向仪表板添加 YouTube 或 Vimeo 视频磁贴之后,该视频会直接在仪表板上播放。When you add a YouTube or Vimeo video tile to your dashboard, the video plays right on your dashboard.

  1. 在“添加磁贴”窗口中,选择“视频” > “下一步” 。From the Add tile window, select Video > Next.

  2. 将视频信息添加到“添加视频磁贴”窗口 :Add video information in the Add video tile window:

    a.a. 要在视频磁贴顶部显示标题和副标题,请选择“显示标题和副标题”,然后输入“标题”和可选的“副标题” 。To display a title and subtitle at the top of the video tile, select Display title and subtitle and enter a Title and an optional Subtitle. 在本例中,我们将添加“副标题”,然后将其转换为指向整个 YouTube 播放列表的超链接 。In this example, we'll add a Subtitle, and then convert it to a hyperlink to the entire YouTube playlist.

    b.b. 输入视频的 URL 。Enter the Video URL for the video.

    c.c. 添加“标题”和“副标题”的超链接,以便你的同事在观看嵌入的视频后可以在 YouTube 上查看整个播放列表 。Add a hyperlink for the Title and Subtitle, so that your colleagues can view the entire playlist on YouTube after they watch the embedded video. 为此,请在“功能”下,选择“设置自定义链接”,然后输入播放列表的 URL 。To do so, under Functionality, select Set custom link, and then enter the URL for the playlist.

    d.d. 选择应用Select Apply.

    添加视频磁贴窗口

  3. 在仪表板上,根据需要重设视频磁贴大小和移动视频磁贴。On the dashboard, resize and move the video tile as needed.

    添加了视频磁贴的仪表板

  4. 选择用于播放视频的视频磁贴。Select the video tile to play the video.

  5. 选择副标题以访问 YouTube 上的播放列表。Select the subtitle to visit the playlist on YouTube.

添加流数据Add streaming data

你可以使用 PubNub 将流数据(例如 Twitter 订阅源或传感器数据)添加到仪表板中的磁贴。You can use PubNub to add streaming data, such as Twitter feeds or sensor data, to a tile in your dashboard. Power BI 已经创建了一个集成来从 PubNub 获取数据。Power BI has created an integration to get the data from PubNub. 这里将介绍它的工作原理。Here, Will explains how it works.

你可以使用 PubNub 将流数据(例如 Twitter 订阅源或传感器数据)添加到仪表板中的磁贴。You can use PubNub to add streaming data, such as Twitter feeds or sensor data, to a tile in your dashboard. Power BI 已经创建了一个集成来从 PubNub 获取数据。Power BI has created an integration to get the data from PubNub. 这里将介绍它的工作原理。Here, Will explains how it works.

  1. 在“添加磁贴”窗口中,选择“自定义流数据” > “下一步” 。From the Add tile window, select Custom Streaming Data > Next.

  2. 选择“添加流数据集” 。Select Add streaming dataset.

  3. 使用 Power BI API 或 PubNub 创建“新的流数据集” 。Create a New streaming dataset using the Power BI API or PubNub.

  4. 填写“数据集名称”、“订阅密钥”和“频道名称”字段 。Fill in the fields for Dataset name, Subscription key, and Channel name. 如果它是安全连接,还会有授权密钥。If it's a secure connection, it also has an authorization key. 你可以使用 PubNub 中的示例值进行试用。You can use the sample values from PubNub to try it out.

  5. 选择下一步Select Next. 你会看到数据集中可用的字段及其数据类型和 JSON 格式。You see the fields that are available in the dataset, with their data types and JSON format.

  6. 选择“连接” 。Select Connect. 你已创建流数据集。You have created a streaming dataset.

  7. 返回仪表板并再次选择“添加磁贴” > “自定义流数据” > “下一步” 。Go back to the dashboard and again select Add tile > Custom Streaming Data > Next.

  8. 选择创建的传感器数据数据集,然后选择“下一步” 。Select the sensor data dataset you created > Next.

  9. 选择所需的视觉对象类型。Select the visual type you want. 通常,此类数据适合使用折线图。Often a line chart works well for this data.

  10. 选择“轴”、“图例”和“值” 。Select the Axis, Legend, and Values.

  11. 确定要显示的时间量,以秒、分钟或小时为单位。Decide the amount of time you want to display, either in seconds, minutes, or hours.

  12. 选择下一步Select Next.

  13. 如果需要,可为其提供“标题”和“副标题” 。Give it a Title and Subtitle, if you want.

  14. 将其固定到仪表板。Pin it to your dashboard.

  15. 在“添加磁贴”窗口中,选择“自定义流数据” > “下一步” 。From the Add tile window, select Custom Streaming Data > Next.

  16. 选择“添加流数据集” 。Select Add streaming dataset.

  17. 使用 Power BI API 或 PubNub 创建“新的流数据集” 。Create a New streaming dataset using the Power BI API or PubNub.

  18. 填写“数据集名称”、“订阅密钥”和“频道名称”字段 。Fill in the fields for Dataset name, Subscription key, and Channel name. 如果它是安全连接,还会有授权密钥。If it's a secure connection, it also has an authorization key. 你可以使用 PubNub 中的示例值进行试用。You can use the sample values from PubNub to try it out.

  19. 选择下一步Select Next.

    你会看到数据集中可用的字段及其数据类型和 JSON 格式。You see the fields that are available in the dataset, with their data types and JSON format.

  20. 选择“连接” 。Select Connect.

    你已创建流数据集。You've created a streaming dataset.

  21. 返回仪表板并再次选择“添加磁贴” > “自定义流数据” > “下一步” 。Go back to the dashboard and again select Add tile > Custom Streaming Data > Next.

  22. 选择创建的传感器数据数据集,然后选择“下一步” 。Select the sensor data dataset you created > Next.

  23. 选择所需的视觉对象类型。Select the visual type you want. 通常,此类数据适合使用折线图。Often a line chart works well for this data.

  24. 选择“轴”、“图例”和“值” 。Select the Axis, Legend, and Values.

  25. 确定要显示的时间量,以秒、分钟或小时为单位。Decide the amount of time you want to display, either in seconds, minutes, or hours.

  26. 选择下一步Select Next.

  27. (可选)为其提供“标题”和“副标题” 。Optionally, give it a Title and Subtitle.

  28. 将其固定到仪表板。Pin it to your dashboard.

添加 Web 内容Add web content

你可以将任何 HTML 内容(作为磁贴)粘贴或键入到报表或仪表板中。You can paste or type in any HTML content, as a tile, to your report or dashboard. 手动输入嵌入代码,或从 Twitter、YouTube、embed.ly 等站点复制/粘贴。Enter the embed code manually or copy/paste from sites such as Twitter, YouTube, embed.ly, and so on.

  1. 在“添加磁贴”窗口中,选择“Web 内容” > “下一步” 。From the Add tile window, select Web content > Next.

  2. 将信息添加到“添加 Web 内容磁贴”窗口 :Add information to the Add web content tile window:

    a.a. 要在磁贴上方显示标题,请选择“显示标题和副标题”,然后输入“标题”和可选的“副标题” 。To display a title above the tile, select Display title and subtitle and enter a Title and an optional Subtitle.

    b.b. 输入嵌入代码。Enter the embed code. 在本例中,我们将复制并粘贴 Twitter 源。In this example, we're copying and pasting a Twitter feed.

    c.c. 选择应用Select Apply.

    添加 Web 内容磁贴窗口

  3. 在仪表板上,根据需要重设 Web 内容磁贴大小和移动 Web 内容磁贴。On the dashboard, resize and move the web content tile as needed.

    包含四个磁贴的仪表板

嵌入 Web 内容的提示Tips for embedding web content

  • 若为 iframe,请使用安全的源。For iframes, use a secure source. 如果输入 iframe 嵌入代码并获得空白磁贴,请确认没有使用 http 作为 iframe 源 。If you enter your iframe embed code and get a blank tile, verify you're not using http for the iframe source. 如果是,请将其更改为 https 。If you are, change it to https.

    <iframe src="https://xyz.com">
    
  • 编辑宽度和高度信息。Edit width and height information. 此嵌入代码会嵌入视频,并将视频播放器设置为 560 x 315 像素。The embed code embeds a video and sets the video player to 560 x 315 pixels. 当你重设磁贴大小时,这个大小不会更改。This size doesn't change as you resize the tile.

    <iframe width="560" height="315"
    src="https://www.youtube.com/embed/Cle_rKBpZ28" frameborder="0"
    allowfullscreen></iframe>
    

    如果希望播放器重设大小以适应磁贴大小,请将宽度和高度设为 100%。If you'd like the player to resize to fit the tile size, set the width and height to 100%.

    <iframe width="100%" height="100%"
    src="https://www.youtube.com/embed/Cle_rKBpZ28" frameborder="0"
    allowfullscreen></iframe>
    
  • 此代码会嵌入推文,并将 AFK 播客、@GuyInACube 的 Twitter 页面、关注、#分析、回复、转推和点赞等链接以单独的链接形式保留在仪表板上。This code embeds a tweet and retains, as separate links on the dashboard, links for the AFK podcast, @GuyInACube's Twitter page, Follow, #analytics, reply, retweet, and like. 选择磁贴本身会带你前往 Twitter 的播客。Selecting the tile itself takes you to the podcast on Twitter.

    <blockquote class="twitter-tweet" data-partner="tweetdeck">
    <p lang="en" dir="ltr">Listen to
    <a href="https://twitter.com/GuyInACube">@GuyInACube</a> talk to
    us about making videos about Microsoft Business Intelligence
    platform
    <a href="https://t.co/TmRgalz7tv">https://t.co/TmRgalz7tv </a>
    <a href="https://twitter.com/hashtag/analytics?src=hash">
    #analytics</a></p>&mdash; AFTK Podcast (@aftkpodcast) <a
    href="https://twitter.com/aftkpodcast/status/693465456531771392">
    January 30, 2016</a></blockquote> <script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
    

编辑磁贴Edit a tile

要更改现有磁贴,请执行以下操作:To make changes to an existing tile:

  1. 将鼠标悬停在磁贴右上角并选择省略号 (...)。Hover over the top-right corner of the tile and select the ellipsis (...).

    选择磁贴省略号

  2. 选择“编辑详细信息”以显示“磁贴详细信息”窗口并进行更改 。Select Edit details to display the Tile details window and make changes.

    编辑详细信息

注意事项和疑难解答Considerations and troubleshooting

  • 要更轻松地在仪表板上移动磁贴,请添加标题和可选的副标题。To make it easier to move the tile on your dashboard, add a title and an optional subtitle.
  • 如果想要嵌入网站中的内容,但网站未提供可供复制和粘贴的嵌入代码,请参阅 embed.ly 获取有关生成嵌入代码的帮助。If you'd like to embed content from a website, but the website doesn't provide embed code to copy and paste, see embed.ly for help with generating the embed code.

后续步骤Next steps

Power BI 设计器的仪表板磁贴简介Intro to dashboard tiles for Power BI designers

更多问题?More questions? 尝试参与 Power BI 社区Try the Power BI Community.