简体   繁体   English

如何使用像 Excel 这样的 Power BI Sparkline

[英]How to use Power BI Sparkline like Excel

Is it possible to create a sparkline in power bi desktop without using date.是否可以在不使用日期的情况下在 power bi desktop 中创建迷你图。 for example I have 3 columns which have their own values.例如,我有 3 列有自己的值。 I want to show these values in a column which is a sparkline exactly like spark line in excel.我想在与 excel 中的迷你图完全一样的迷你图列中显示这些值。 I need something like this in power bi: see this picture我在 power bi 中需要这样的东西:看这张照片

How can I create it?我怎样才能创建它? What should be in x-axis and y-axis? x轴和y轴应该是什么? Thanks谢谢

Power Bi doesn't work on pivoted (wide) tables like Excel does, but on stacked (long) tables instead. Power Bi 不适用于 Excel 之类的旋转(宽)表,而是适用于堆叠(长)表。 So you have to prepare your data accordingly.因此,您必须相应地准备数据。 You can still show it in wide format afterwards using a Matrix visual.之后,您仍然可以使用 Matrix 视觉对象以宽格式显示它。 However, to add sparklines like in your example you would need a table that is just filtering by rows.但是,要像您的示例中那样添加迷你图,您需要一个仅按行过滤的表。 Here you can add spaklines with Value on the Y-axis and Column on the X-axis .在这里,您可以添加带有Y 轴上ValueX 轴上Column的线条。 The aggregation doesn't matter for your sample data, so leave it to Sum.聚合对您的示例数据无关紧要,因此将其留给 Sum。

在此处输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM