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 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
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 |
---|---|
112 | |
97 | |
85 | |
67 | |
59 |
User | Count |
---|---|
150 | |
120 | |
100 | |
87 | |
68 |