Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
herwet
Frequent Visitor

Combining multiple measures into one column chart.

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: 

GP 2021 AMS = calculate(SUMX('General Measures',[SUM Amount]), FILTER('Fact_Table','Fact_Table'[P&L Level 3] IN {"Product cogs", "Product revenue", "Service COGS", "Services revenue"}), ('Dim_Date'[Year] = "2021" ), (Fact_Table[Region u/ACON] = "AMS"))
 
This is divided into the following DAX to find workforce by AMS: 
Sales AMS 2021 = CALCULATE(sum('Workforce'[Workforce]), 'Workforce'[JC KEY] = "HC2000", 'dim_date'[Year] = "2022", Workforce[Region] = "AMS" ) --> This is later turned into average per month
 
So the question is: By doing this I need to create a significant amount of measures to find gross profit per region in 2021 and 2022, to measure differences. 
However, do someone know if I can write this DAX more efficiently and be able to visualize that data in one column chart? Now I have to use multiple column charts next to each other since it's different data fundament. 
 
Hope this made some sort of sense. Appreciate some help with this 🙂 

 

3 REPLIES 3
lukmtb08
Helper III
Helper III

You can use one Switch-measures in your visual. Within the Switch you can create a reference to your measures.

V-lianl-msft
Community Support
Community Support

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.

amitchandak
Super User
Super User

@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 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors