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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

ALL function not working as expected for a DAX Formula

 

I'm working on a PowerBI report  and one of the DAX is not working as expected. I use various filters in the page and at a particular scenario the ALL function is not working as expected.

 

For example I use below filters

1. MainStarTable[OID]

2. MainStarTable[FID]

3. MainStarTable[LengtOFstay]

4. MainStarTable[DateRange]

 

When using only FID and OID filters all the below DAX is returing the expected results. But when I use all the filters combined DAX3 and DAX2 is not working as expected

 

DAX1  =ageGroup= CALCULATE(sum(DM_AgeGrouping[validRecordbit]))

DAX2  =NageGroup= CALCULATE(sum(DM_AgeGrouping[validRecordbit]),ALL(MainStarTable[OID]))

DAX3  =OageGroup=CALCULATE(sum(DM_AgeGrouping[validRecordbit]),ALL(MainStarTable[FID],MainStarTable[OID])

 

Problem is with DAX3 and DAX2. For some reason DAX3/DAX2 is not utilizing the function ALL(MainStarTable[FID],MainStarTable[OID])

 

If anyone have any suggestion, please let me know. Thanks

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , these seems correct. Are facing value issue or some error

 

DAX2 =NageGroup= CALCULATE(sum(DM_AgeGrouping[validRecordbit]),ALL(MainStarTable[OID]))

 

Means other then OID view in table, you should see filter on OID is removed. For the OID group by/view you will see total value without filter with selected value.

 

refer

https://www.sqlbi.com/articles/using-allexcept-versus-all-and-values/

https://www.sqlbi.com/articles/managing-all-functions-in-dax-all-allselected-allnoblankrow-allexcept/

 

Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

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
Anonymous
Not applicable

@amitchandak  Yes I know how this works. Problem is I'm missing some values in the OID columns which is not suppose to happen when OID filters are used. Again use the below link to download the sample file. 

 

https://www.dropbox.com/s/s0xkou30i1g1keg/TestFile.pbix?dl=0

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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