Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hi,
My margin % is from profit divide sales. How do I calcualate the margin % difference for both year? There is subtotal in the formatting, but I want difference instead.
Solved! Go to Solution.
Hi @Anonymous ,
You want to replace subtotal with the result you want. You can use the ISINSCOPE function.
Measure = IF(ISINSCOPE('Table'[Year]),[Percentage],[Difference])
The example I attached is relatively simple, you can refer to it.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
You want to replace subtotal with the result you want. You can use the ISINSCOPE function.
Measure = IF(ISINSCOPE('Table'[Year]),[Percentage],[Difference])
The example I attached is relatively simple, you can refer to it.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @Anonymous
Try creating a measure like:
YoY Variance Margin =
VAR __PREV_YEAR = CALCULATE([YourMargin%]), DATEADD('Date'[Date], -1, YEAR)
//Replace 'Date'[Date] by your date column coming from Calendar table
VAR __CURR_YEAR = [YourMargin%] --Selected by slicer
RETURN
__CURR_YEAR - __PREV_YEAR
It is suggested that you have date table and using date from there 'Date'[Date]
[YourMargin%] - you should replace it by your Margin measure calculation
Proud to be a Super User!
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Ask questions in Eventhouse and KQL, Eventstream, and Reflex.
User | Count |
---|---|
86 | |
84 | |
66 | |
62 | |
59 |
User | Count |
---|---|
197 | |
116 | |
107 | |
77 | |
70 |