简体   繁体   English

如何从日期时间开始在Power BI中的图表上显示每月数据

[英]How to show monthly data on diagram in Power BI from datetime

I have historical daily gold prices in excel and I load them to the Power BI. 我有Excel的历史每日黄金价格,然后将其加载到Power BI。 But in default, Power BI shows me only year based value, but for year 2016 i have values only for January and February and therefore diagram is distorted as you can see below. 但是默认情况下,Power BI仅显示基于年的值,但是对于2016年,我仅显示1月和2月的值,因此该图会失真,如下图所示。

在此处输入图片说明

Base data looks like (can be downloaded here in .csv) 基础数据的模样(可下载这里以.csv)

在此处输入图片说明

Visual setting is 视觉设置为

在此处输入图片说明

And i want to see diagram curve to be done by months to prevent distortion. 而且我想看到图表曲线要几个月才能完成,以防止变形。

Curve should be similar to this diagram 曲线应与此图相似 在此处输入图片说明

There are years only as a description 仅以年份为例

Thank you for help 谢谢你的帮助

PBI is has generated a Date Hierarchy with only a Year level. PBI已生成只有年份级别的日期层次结构。 I can tell that from the word "Year" appearing under on the Visualizations pane, under "Date" (in the Axis Section). 我可以从“可视化”窗格中“日期”下(在“轴”部分中)下出现的“年份”一词中看出。

I would click the small down-arrow to the right of "Date", in the Axis section. 我将在“轴”部分中单击“日期”右边的小向下箭头。 I would change that setting from "Date Hierarchy" to "Date". 我会将其设置从“日期层次结构”更改为“日期”。 This will plot every daily value on the chart. 这将在图表上绘制每个每日值。

Unfortunately you cant control the date format used in the X-Axis labels - hopefully they will add that in some future release. 不幸的是,您无法控制X轴标签中使用的日期格式-希望它们会在将来的版本中添加它。 Their automatic labeling is usually OK. 他们的自动标签通常可以。

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

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