Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
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