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.
Hi,
I would like to create a trend graph that shows the YoY% growth by the month over the last 12 months. The month should change automatically every Month, for example this month is Aug, so it should show Sept 2018 till Aug 2019.
And the growth should be showing the growth trend to the previous year so:
Dec 2018 -> Growth from Dec 2017 and so on.
I have created a YoY% Quick Measure and used this however it shows this error here. How do I solve this?
Value in last 12 month = CALCULATE(SUMX(Table, Table[GP YoY%]), DATESBETWEEN(Period[Txn Month], EDATE(TODAY(), -12), TODAY()))
Hi,
This is how you can do it.
1. Create a measure to calculate the total value. For e.g
Total Sales = SUMX(Sales, Sales[Quantity] * Sales[Price] )
2. Create a measure to calculate the total value for last 12 months. For e.g
Total Sales LY = CALCULATE( [Total Sales], DATEADD( Dates[Date], -1, YEAR ))
3. Create a YoY measure
YoY Sales = var sale_diff = [Total Sales] - [Total Sales LY] var yoy_sale = DIVIDE(sale_diff, [Total Sales LY], 0) RETURN yoy_sale
4. Show YoY measure on a visual e.g line chart against date as axis.
Thanks.
@Anonymous
Thank you, I have some questions.
My Sales is already precalculated as numbers are taken from system, thus is there any other steps I can take? Also, how do you get the months to show up? I only managed to get the year and not month.
Thank you.
@Anonymous Hi,
I managed to solve it, as my data has multiple slicers thus there are a lot of restrictions.
But my current solution is create a quick measure for YoY%, then add in data hireachy for the axis, with my respective data needed for the legend and sales for values.
After which I manually change the X Axis to show data from a predefined date. What do you think?
Thank you.
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 |
---|---|
109 | |
99 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
102 | |
87 | |
64 |