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
ys034
Helper I
Helper I

Calculation should not change during specific filter selection

Hello community I am learning DAX new recently

 

I have a question about ignoring a calculation based on the filter criteria
As you can see on the picture the market shares are calculated correctly.
When I select Brand a it shows me 100% but I want it to show me 35% like in the first picture.

ys034_0-1641995012051.png

ys034_1-1641995066191.png

 

I would be very happy about an answer

1 ACCEPTED SOLUTION

How about something simpler?

CALCULATE (
    SUM ( 'DataTable'[Sales] ),
    ALL ( 'DataTable'[Brand] )
)

View solution in original post

5 REPLIES 5
v-jingzhang
Community Support
Community Support

Hi @ys034 

 

Have you tried Alexis's formula for Grand Total? It should work I think. 

 

Best Regards,
Community Support Team _ Jing

amitchandak
Super User
Super User

@ys034 , For grand total you might have created a measure

calculate([Measure], allselected())

 

Use all in place of that

calculate([Measure], all())

 

or

 

calculate([Measure], all(TableName))

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

My Measure: 

Grand Total Sales = CALCULATE(SUMX(VALUES('DataTable'),'DataTable'[Sales]),filter(ALLSELECTED('DataTable'), 'DataTable'[Date].[Year] = max('DataTable'[Date].[Year])),FILTER(ALLSELECTED('DataTable'),'DataTable'[Country] = MAX('DataTable'[Country])),ALLSELECTED())
 
This is my new measure but it doesn't work. Any other ideas?

How about something simpler?

CALCULATE (
    SUM ( 'DataTable'[Sales] ),
    ALL ( 'DataTable'[Brand] )
)

@ys034 , Try like

Grand Total Sales = CALCULATE(SUMX(VALUES('DataTable'),'DataTable'[Sales]),filter(ALL('DataTable'), 'DataTable'[Date].[Year] = max('DataTable'[Date].[Year])),FILTER(ALLSELECTED('DataTable'),'DataTable'[Country] = MAX('DataTable'[Country])),ALL())

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
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.