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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Arpit_Jain
Frequent Visitor

All function not working as supposed to

Hi,
I am trying to get top-3 brands according to the price band I've set. Whenever I put in a filter of top n or try to select the brands, calculation for % Vol MS changes according to the selection. Dax for % Vol MS is: SUM('all-categories'[Sales units])/ CALCULATE(SUM('All-Categories'[Sales units]),ALL('All-categories'[BRANDS]))*100.

Arpit_Jain_1-1653268481698.png

 





4 REPLIES 4
Anonymous
Not applicable

Hi @Arpit_Jain ,

 

Please try ALL('all-categories') instead.

Or try this formula:

SUM('all-categories'[Sales units])/SUMX(ALL('all-Categories'),'all-Categories'[Sales units])*100

If it still doesn't work, please share sample data.

 

Best Regards,

Jay

m3tr01d
Continued Contributor
Continued Contributor

hi @Arpit_Jain,

did you try using ALLSELECTED instead of ALL? I think it might solve your issue. If it doesn't work, can you give us some screenshots how when it doesn't work and what would be the right behavior?

Arpit_Jain_0-1653325424233.pngArpit_Jain_1-1653325450577.png

Arpit_Jain_2-1653325578880.png

 

 

I want % Vol MS to be constant and not change if we change the number of brands

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.