Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello,
i have a table like the following one:
REQUESTED_DATE | VALUE |
01.01.2018 | 10 |
... | ... |
28.01.2018 | 8 |
I want to show the following in a line diagram:
X-axis: fixed 12 months (january-december; business year)
First line:
VALUE summed for each month
Second line:
Avergage of VALUE last year as a straight line (but mapped/shown to the fixed X-axis)
How can i achieve this?
Solved! Go to Solution.
Hi @Anonymous
Create a measure
average last year = CALCULATE(AVERAGE('Table 3'[value]),FILTER(ALLSELECTED('date'),DATEADD('date'[Date],-1,YEAR)))
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous
Create a measure
average last year = CALCULATE(AVERAGE('Table 3'[value]),FILTER(ALLSELECTED('date'),DATEADD('date'[Date],-1,YEAR)))
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous , Try with time intelligence
YTD Sales = CALCULATE([Avg Monthly],DATESYTD('Date'[Date],"12/31"))
Last YTD Sales = CALCULATE([Avg Monthly],DATESYTD(dateadd('Date'[Date],-1,Year),"12/31"))
This year Sales = CALCULATE([Avg Monthly], DATESYTD(ENDOFYEAR('Date'[Date]),"12/31"))
Last year Sales = CALCULATE([Avg Monthly],DATESYTD(ENDOFYEAR(dateadd('Date'[Date],-1,Year)),"12/31"))
Last to last YTD Sales = CALCULATE([Avg Monthly],DATESYTD(dateadd('Date'[Date],-2,Year),"12/31"))
Refer Power BI — YTD Questions — Time Intelligence 1–5
https://medium.com/@amitchandak.1978/power-bi-ytd-questions-time-intelligence-1-5-e3174b39f38a
To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :
https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions
https://www.archerpoint.com/blog/Posts/creating-date-table-power-bi
https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/
See if my webinar on Time Intelligence can help: https://community.powerbi.com/t5/Webinars-and-Video-Gallery/PowerBI-Time-Intelligence-Calendar-WTD-YTD-LYTD-Week-Over-Week/m-p/1051626#M184
Appreciate your Kudos.
Thank you for your quick reply.
Could you also explain me how to achieve the aggregation by month?
I have lots of dates but don't know, how to aggregate them for a line chart.
This is my expected result:
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
100 | |
80 | |
64 | |
58 |
User | Count |
---|---|
148 | |
111 | |
93 | |
84 | |
66 |