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,
I have an issue I have been struggling with.
The case is:
I am making a KPI report and want to measure Gross Profit per region divided by workforce per region in the different sectors.
For example, I have following DAX to calculate gross profit in sales in region AMS in 2021:
You can use one Switch-measures in your visual. Within the Switch you can create a reference to your measures.
Hi @herwet ,
You need to confirm the current context of your measure If you need to calculate all regions, you should consider adding fields to the visual to affect the context.
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@herwet , I will use measure like
Sales AMS 2021 = CALCULATE(sum('Workforce'[Workforce]), 'Workforce'[JC KEY] = "HC2000",, Workforce[Region] = "AMS" , filter( 'dim_date' , 'dim_date'[Year] = max( 'dim_date'[Year]) ) )
example
//Only year vs Year, not a level below
This Year = CALCULATE(sum('Table'[Qty]),filter(ALL('Date'),'Date'[Year]=max('Date'[Year])))
Last Year = CALCULATE(sum('Table'[Qty]),filter(ALL('Date'),'Date'[Year]=max('Date'[Year])-1))
You can also check calculation groups Calculation Groups- Measure Slicer, Measure Header Grouping, Measure to dimension conversion. Complex Table display : https://youtu.be/qMNv67P8Go0
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
User | Count |
---|---|
87 | |
87 | |
68 | |
66 | |
63 |
User | Count |
---|---|
208 | |
120 | |
113 | |
79 | |
72 |