简体   繁体   English

图表中的Power Bi日期

[英]Power Bi Dates in Chart

I am trying to solve this problem, I have a table with company_name , articles and each one of them has a price and amount, with a certain date. 我正在尝试解决这个问题,我有一个带有company_name的表,文章和每个文章都有一个价格和金额,有一定的日期。 So this article could be ordered many times. 所以这篇文章可以多次订购。 At the end it looks something like this: 最后它看起来像这样:

Company     Article     Price   Amount      Date
----------------------------------------------------
  X           A1         10        3      12.03.2015
  Y           B1         20        5      10.01.2014
  Z           A1         30        9      25.12.2014
 ...         ...         ...      ...        ...

The problem that i want to represent that in Power Bi and most of the charts the do take the Sum of the Axises , I want the X to be dates (Without Aggregation) and the Y to be the Prise beside the Article with its size which is the Amount. 我想在Power Bi中表示的问题和大多数图表确实采用Axises的总和,我希望X是日期(没有聚合)而Y是文章旁边的奖项,其大小是是金额。 I would go for the Scatter Chart but I do not want the time line becuase I do need to show the dates on the X. So I thought I could do anything with the database so to add or aggregate anything. 我会去Scatter Chart但是我不想要时间线,因为我需要在X上显示日期。所以我想我可以对数据库做任何事情来添加或聚合任何东西。 But I have no Idea how to do that .... 但我不知道怎么做......

There is no way in Power BI for a scatter chart to use an attribute like "date" (or "category") on an axis. 在Power BI中,散点图无法在轴上使用“日期”(或“类别”)等属性。

A scatter chart in Power BI plots your data against 2 measures (one on each axis). Power BI中的散点图根据2个度量(每个轴上一个)绘制数据。 Measures, unlike attributes, are aggregated. 与属性不同,度量是聚合的。 This is why, when you put a date on a scatter chart axis, Power BI turns it into a "Count of Date" measure - as that's the only way to aggregate a date. 这就是为什么当您在散点图轴上放置日期时,Power BI将其转换为“日期计数”度量 - 因为这是聚合日期的唯一方法。 (If date represented a length of time, then you could convert the length into a number and plot using that - but that isn't what you're trying to do.) (如果日期代表一段时间,那么您可以将长度转换为数字并使用该数字进行绘图 - 但这不是您要做的事情。)

Note that when you look at the Wikipedia page for Scatter plots , the examples shown match how Power BI works: 2 variables plotted against each other. 请注意,当您查看Scatter图Wikipedia页面时 ,显示的示例与Power BI的工作方式相符:2个变量相互绘制。

It sounds like what you're looking for is more of a column chart, but instead of columns, you want bubbles of different sizes. 听起来你正在寻找的更多的是柱形图,但是你需要不同尺寸的气泡而不是柱子。 Power BI doesn't have anything like this right now. Power BI现在没有这样的东西。 There are a few ideas you could vote for that might be relevant to what you're trying to accomplish: 您可以投票的一些想法可能与您要完成的任务相关:

  1. Allow nonaggregrated data in Scatter Charts 允许散点图中的非聚合数据
  2. Allow For Time-Series Data to Be Displayed on a Scatter Plot 允许在散点图上显示时间序列数据
  3. XY scatter chart would be a great addition. XY散点图将是一个很好的补充。 X axis that doesn't have to be an aggregate X轴不必是聚合

Unfortunately, I don't have a good alternative suggestion for what you want to do using Power BI as it is today. 不幸的是,对于你今天使用Power BI所做的事情,我没有一个很好的替代建议。 I would recommend thinking about exactly what you're trying to show. 我建议你考虑一下你要展示的内容。 Sometimes putting too much data on one chart makes the chart harder to understand. 有时在一个图表上放置太多数据会使图表更难理解。 Column charts are boring, but they are effective. 柱形图很无聊,但它们很有效。 Power BI supports cross-filtering, slicers, legends & drill-downs which, with some interactivity, can allow for a lot of information to be gleaned from a single chart. Power BI支持交叉过滤,切片器,图例和下钻,通过一些交互性,可以从单个图表中收集大量信息。

数据图片作为柱形图 Ignore my American date formats. 忽略我的美国日期格式。 While I can't chart Amount, Company, Article, Date & Price all in one chart, I can do 2 charts that cross-filter each other. 虽然我无法在一个图表中绘制数量,公司,文章,日期和价格,但我可以做两个相互交叉过滤的图表。 Alternatively, I can do a drill-down from company to article to date. 或者,我可以从公司到文章进行深入研究。 Power BI has a lot of options, depending on what information you want people to take away from your charts. Power BI有很多选项,具体取决于您希望人们从图表中获取哪些信息。

Another thing to note is that Power BI is not a graphing tool (like Excel, for example). 另外需要注意的是Power BI不是图形工具(例如Excel)。 Power BI is geared towards aggregating data and providing insights based on those aggregations. Power BI旨在聚合数据并根据这些聚合提供洞察力。 If your requirements involve no aggregation, but rather plotting points directly onto a chart, it's good to consider whether Power BI is the best tool. 如果您的要求不涉及聚合,而是直接将点绘制到图表上,那么考虑Power BI是否是最佳工具是很好的。

I know this doesn't really answer your question, but thought an answer would be more helpful than none. 我知道这并没有真正回答你的问题,但认为答案会比没有答案更有帮助。 A picture of your desired output would have helped a lot too. 您想要的输出图片也会有很大帮助。

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

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