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!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
I have a measure that I use to calculate my gross margin this measure goes like this:
Hi,
According to your description, I used your pbix file to test and made some changes to your measures:
Here is one changed measure as the example:
Gross Margin Measure =
IF (
CALCULATE ( COUNTROWS ( Mapping ), ALLSELECTED ( Mapping ) )
= CALCULATE ( COUNTROWS ( Mapping ), ALL ( Mapping ) ),
AVERAGEX (
SUMMARIZE (
Mapping,
Mapping[Sales Group],
"Net", CALCULATE (
[Gross Margin],
FILTER (
'ZSD_MAT_MARGIN_Q003',
'ZSD_MAT_MARGIN_Q003'[Calendar Year/Month.Calendar Year/Month Level 01]
IN SELECTCOLUMNS (
FILTERS ( 'Month Wise Royalty'[Month/Year] ),
"MonthYear", UPPER ( [Month/Year] )
)
)
)
),
[Net]
),
CALCULATE (
[Gross Margin],
FILTER (
'ZSD_MAT_MARGIN_Q003',
'ZSD_MAT_MARGIN_Q003'[Calendar Year/Month.Calendar Year/Month Level 01]
IN SELECTCOLUMNS (
FILTERS ( 'Month Wise Royalty'[Month/Year] ),
"MonthYear", UPPER ( [Month/Year] )
)
)
)
)
And the other three measures should be changed as the same with above.
The result shows:
1)when not choosing any Sales Group slicer value:
2)when choosing one value in Sales Group slicer:
Here is the changed pbix file you shared:
Best Regards,
Giotto Zhi
@Mariusz Thanks for the response, but this is something that is giving me incorrect values, plus I was able to create some measures that gives me weighted averages for Rates, Commission, Royalty, I had created below measures for each of the rates here:
Here is my Pbix file: https://ifitech-my.sharepoint.com/:u:/g/personal/anmol_ganju_ifi_tech/EfU8FgWYavtCm8XmbWaM_iIB-rku-W...
And the spreadsheet that I have: https://ifitech-my.sharepoint.com/:x:/g/personal/anmol_ganju_ifi_tech/EbG9yQi0NQFCvpcZS1qtmlcB4uAoe9...
Hi here is the report link https://ifitech-my.sharepoint.com/:u:/g/personal/anmol_ganju_ifi_tech/EWTxOwU-fZNMrfjuVvLkj3MBBkH-Vl...
I need to see 5 sales group overall average in gross margin, for now individual calculation of gross margin is correct, but am not sure how can I calculate the average and display inside the same line chart which is in page1?
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!