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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
mhbon
Frequent Visitor

Percentage of grand total per month

Hi everybody

 

I need to calculate the percentage of a grand total in a measure. I would use this to compare the quantities of food I want to track against all the food I have in my data (even the ones I am not tracking in this visual)

 

FoodJan 2021Feb 2021
Pizza10%25%
Spaghetti25%50%

 

The data looks like this:

FoodDateQuantity
Broccoli2 jan 20214
Pizza3 jan 20211
Bread4 jan 20215
Spaghetti5 jan 20212
Carrots6 jan 20214
Spaghetti7 jan 20213
Pizza8 jan 20211
Carrots 8 feb 2021 1
Pizza15 feb 20211
Spaghetti21 feb 20212
..........

 

I already tried diffrent ways of using the ALL() filter and its many varieties but I'm really not getting anywhere.

Really greatfull if someone could help out!

Thanks in advance! 

M

3 REPLIES 3

Read my article here https://exceleratorbi.com.au/the-all-function-in-dax/

towards the bottom, using ALL in a measure. 



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.

Hi Matt,

 

Thanks for your fast response. I stumbled across your article while searching for a way to resolve this issue before. However I find that when excluding the records containing Broccoli and Carrots from my visual, these do not get included in the grand total. 

I realise that this might just be impossible since I choose to exclude Borccoli and Carrots from my visual. 

I couldn't say for sure if ALL can remove filters excluded in a visual. It may depend how you exclude them. It should be simple to test with a test measure using all. Just test various exclusion options including slicers and the filter pane



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors