Forum Discussion
Adding Measure extends X-Axis...
- 1 year ago
your data model is the wrong way round.
Dates should be the dimension table and "Table1" the facts table.
Then do what Ashish_Mathur suggested.
Why is the dark line supposed to be straight? It's an average over 30 days.
By the way, you can do that much simpler with Window functions.
30DayAvg = CALCULATE(AVERAGE(Table1[Reading]), WINDOW(-29,REL,0,rel,ALLSELECTED(Dates[Date]))) - 1 year ago
PBI file attached.
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information. Do not include anything that is unrelated to the issue or question.
Please show the expected outcome based on the sample data you provided.
Need help uploading data? https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523
https://www.icloud.com/iclouddrive/005zx52OtE6uGPWPbm07jWGLA#x_axis_issue
Attached. Understand that it's not always easy to upload files for those of us who work in corproate environments where everything is locked down. I thought it was straightforward enough to understand from a screenshot, but realize that a PBIX is always better when asking for help.
Thanks for looking.
- lbendlin1 year agoSuper User
your data model is the wrong way round.
Dates should be the dimension table and "Table1" the facts table.
Then do what Ashish_Mathur suggested.
Why is the dark line supposed to be straight? It's an average over 30 days.
By the way, you can do that much simpler with Window functions.
30DayAvg = CALCULATE(AVERAGE(Table1[Reading]), WINDOW(-29,REL,0,rel,ALLSELECTED(Dates[Date]))) - Ashish_Mathur1 year agoSuper User
Hi,
On the X-axis, drag Date from the Dates table.
- bvy1 year agoHelper V
Thank you Ashish_Mathur but the dark line is supposed to be constant (straight).
- Ashish_Mathur1 year agoSuper User
PBI file attached.