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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
mantaga
Frequent Visitor

All Function not working correctly

Hello,

i have these 2 simple DAX Measures, with which I'm trying to calculate the percentage of each category. Therefore I use the All Function, but somehow it only works if I use the "criteriaID" instead of only "criteria".

 

All Column not working = CALCULATE([Invoice Category], ALL( AnalysisOfInvoiceTypesHistorie[criteria]))

All Column working       = CALCULATE([Invoice Category], ALL( AnalysisOfInvoiceTypesHistorie[criteriaID]))

 

Screenshot 2020-08-06 at 15.43.11.png

 

Does anybody have an idea on this ? I was thinking of the length of criteria?!

Thanks for any hint 🙂

 

 

1 ACCEPTED SOLUTION
Fowmy
Super User
Super User

@mantaga 

 

Try it this way, include the key in ALL,

 

All Column  = CALCULATE([Invoice Category], ALL( AnalysisOfInvoiceTypesHistorie[criteria]),

AnalysisOfInvoiceTypesHistorie[criteriaID]))

 

________________________

Did I answer your question? Mark this post as a solution, this will help others!.

Click on the Thumbs-Up icon on the right if you like this reply 🙂

YouTube, LinkedIn

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

6 REPLIES 6
Fowmy
Super User
Super User

@mantaga 

 

Try it this way, include the key in ALL,

 

All Column  = CALCULATE([Invoice Category], ALL( AnalysisOfInvoiceTypesHistorie[criteria]),

AnalysisOfInvoiceTypesHistorie[criteriaID]))

 

________________________

Did I answer your question? Mark this post as a solution, this will help others!.

Click on the Thumbs-Up icon on the right if you like this reply 🙂

YouTube, LinkedIn

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

sturlaws
Resident Rockstar
Resident Rockstar

Hi @mantaga 

 

just wondering, is AnalysisOfInvoiceTypesHistorie[criteria] sorted by AnalysisOfInvoiceTypesHistorie[criteriaID] in your model?

 

Cheers,
Sturla

@sturlaws good point - yes that's the case...

 

Why does this sort by value prevent the all function to work ? 

 

Thanks!

amitchandak
Super User
Super User

@mantaga , You can try

 

CALCULATE([Invoice Category], allcrossfiltered( AnalysisOfInvoiceTypesHistorie))

CALCULATE([Invoice Category], ALL( AnalysisOfInvoiceTypesHistorie)) //

 

How to use allcrossfiltered and removefilters

https://www.linkedin.com/pulse/five-recent-power-bi-functions-you-should-use-more-often-amit-chandak

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here
harshnathani
Community Champion
Community Champion

Hi @mantaga ,

 

Just use this measure

 

 ALL Values = CALCULATE([Invoice Category], ALL( AnalysisOfInvoiceTypesHistorie)

 

Regards,

Harsh Nathani

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.