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 All! First post, excited to join community.
I have the following data set and I am trying to add a new measure to the very right hand side calculating the Margin Growth. Any ideas?
Solved! Go to Solution.
Hi,
Try this
=IF(ISERROR(CALCULATE([Gross Margin],NEXTYEAR(Calendar[Year]))),([Gross Margin]-CALCULATE([Gross Margin],PREVIOUSYEAR
(Calendar[Year])))/[Gross Margin],BLANK())
Ensure that the years in your visual are dragged from the calendar table and there is a relationship between the Date column of your source data table to the date column of your calendar table.
Hope this helps.
Hi,
Try this
=IF(ISERROR(CALCULATE([Gross Margin],NEXTYEAR(Calendar[Year]))),([Gross Margin]-CALCULATE([Gross Margin],PREVIOUSYEAR
(Calendar[Year])))/[Gross Margin],BLANK())
Ensure that the years in your visual are dragged from the calendar table and there is a relationship between the Date column of your source data table to the date column of your calendar table.
Hope this helps.
Basic pattern for YoY measure would be:
Margin Growth = [Gross Margin] - CALCULATE( [Gross Margin] , DATEADD('Date'[Date], -1, YEAR) )
Where 'Date'[Date] is a column of type = Date with a continuous and unique instance for each day (ie exactly one day for every day of the year). You must have a relationship between this Date table and your FACT table.
In your example table visual you show both 2016 and 2017. If you use the above measure, you will see Margin Growth for both years. The column within 2017 will show (2017 - 2016), and the 2016 column will show [Gross Margin] for (2016 - 2015).
Hey,
welcome to the community.
It would be helpful if you could provide the measure you are using to calculate the YoY Growth.
This side provides valueable insights into almost any date calculation:
http://www.daxpatterns.com/time-patterns/
Hope this gets you started
Regards
Tom
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 |
---|---|
113 | |
100 | |
78 | |
76 | |
52 |
User | Count |
---|---|
146 | |
109 | |
106 | |
88 | |
61 |