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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Lesle
New Member

Use calculation group in a measure doesn't show same result with calculation group used directly

I create a calucation item "Margin calculation" in a calculation group, if I use it directly in a visual, it works, 

2.jpg1.jpg

But when I use it in measure  

Product Mix rate - common = calculate([Product Mix],'Calculation group'[Calculation group column]="Margin Calculation"),
it showes nothing

3.jfif4.jfif

I don't know what's wrong with the measure, is there any possible causes ? 

4 REPLIES 4
Anonymous
Not applicable

Hi @Lesle 

 

The details is not enough to help troubleshoot this issue. Can you share the DAX expressions of the calucation item "Margin calculation" and [Product Mix]? Is [Product Mix] an explicit measure? Calculation items only apply to measures or explicit measures. 

 

Best Regards,
Jing

Thanks for your reply, here is the DAX of "Margin calculation"
Margin calculation = switch(true(),
selectedvalue('Parameter - Dimension'[Parameter - Dimension Fields])="'Master - Mgmt'[Business Line]",sumx(values('Master - Mgmt'[Business Line]),SELECTEDMEASURE()),
selectedvalue('Parameter - Dimension'[Parameter - Dimension Fields])="'Master - Mgmt'[Product Group]",sumx(values('Master - Mgmt'[Product Group]),SELECTEDMEASURE()),
selectedvalue('Parameter - Dimension'[Parameter - Dimension Fields])="'Master - PC'[Product Area1_keydata]",sumx(values('Master - PC'[Product Area1_keydata]),SELECTEDMEASURE()),
selectedvalue('Parameter - Dimension'[Parameter - Dimension Fields])="'Master - PC'[Product Family_S1]",sumx(values('master - PC'[Product Family_S1]),SELECTEDMEASURE()),
selectedvalue('Parameter - Dimension'[Parameter - Dimension Fields])="'Master - PC'[Product Family_S2_Cube]",sumx(values('master - PC'[Product Family_S2_Cube]),SELECTEDMEASURE()),
selectedvalue('Parameter - Dimension'[Parameter - Dimension Fields])="'Master - PC'[PC name]",sumx(values('Master - PC'[PC name]),SELECTEDMEASURE()),
SELECTEDMEASURE())
 
and "Product Mix", what do you mean by explicit measure? 
Product Mix = ([Rev percentage change])*[Gross Margin CY]
Anonymous
Not applicable

It seems you have used a field parameter in the calculation item. Where do you use this field parameter in the report? Does it filter different item when you see the difference?

I used the field parameter as row of the table, you can see "Parameter - Dimension" in the picture. I wanna realize that the calculation item can SUMX different dimension as per the field I selete in the parameter 

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.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors