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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
YunJ
Post Prodigy
Post Prodigy

Why no Total value shown in the matrix?

Hi, I wrote a measure to decide when selecting slicer Category, which Store_eng and Sub-Category should appear.

Capture0.PNG

Here you can see, when selecting slicer Category=Skincare, the Total values appear.

Capture.PNG

However, when selecting Category=Makeup, Total values do not show. Why is it like this??

Capture2.PNG

Thanks a lot for your time.

1 ACCEPTED SOLUTION

@YunJ , Measure get recalculated for Grand total. In case if the condition will be checked for Grand total and will be false. In case of filter, the data is getting removed from scope and Grand total is calculated on that. So you will have the correct total. But there are expectations when calculation use row context to get value. In that case again we need to use summarize or Values to force a row context and sum/avg from there

 

Like in this example group is forced as row context. there can be one than one

sumx(summarize(table,table[group],"_1",[SuperAveage]),[_1])

 

sumx(summarize(table,table[group],table[group1],"_1",[SuperAveage]),[_1])

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

View solution in original post

5 REPLIES 5
v-juanli-msft
Community Support
Community Support

Hi @YunJ 

Is this problem sloved? 
If it is sloved, could you kindly accept it as a solution to close this case and help the other members find it more quickly?
If not, please feel free to let me know.
 
Best Regards
Maggie
amitchandak
Super User
Super User

@YunJ , Instead of if try to use the filter. Otherwise force row context using values or summarize .

 

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

Hi @amitchandak I tried to use FILTER like the following, but the Sub-category in the visual seems like more than what I wrote in the measure.

Capture.PNG

@YunJ , Measure get recalculated for Grand total. In case if the condition will be checked for Grand total and will be false. In case of filter, the data is getting removed from scope and Grand total is calculated on that. So you will have the correct total. But there are expectations when calculation use row context to get value. In that case again we need to use summarize or Values to force a row context and sum/avg from there

 

Like in this example group is forced as row context. there can be one than one

sumx(summarize(table,table[group],"_1",[SuperAveage]),[_1])

 

sumx(summarize(table,table[group],table[group1],"_1",[SuperAveage]),[_1])

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

Hi @amitchandak May I ask how to avoid using IF?

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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