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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Sum with all function

Hello guys,

Been awhile since I have been around PowerBI, I have a basic question.
I have the two following measures:

 

Total Sales = SUM(FactInternetSales[SalesAmount])

ALL Sales = CALCULATE([Total Sales];ALL(DimProduct[EnglishProductName]))

This is yielding the following table.

 


TotalvsAll.JPG

 

 

 

 

 

 

 

So, ALL Sales is basically it is giving me the sum of all products, instead of the sum of the 3 report filtered product I have chosen.
My expected result was 83698,45 to every row.
What rookie mistake am I doing here?

Appreciate the help!!

1 ACCEPTED SOLUTION
Vvelarde
Community Champion
Community Champion

@Anonymous

 

Hi, Try with:

 

ALL Sales = CALCULATE([Total Sales];ALLSELECTED(DimProduct[EnglishProductName]))




Lima - Peru

View solution in original post

3 REPLIES 3
Vvelarde
Community Champion
Community Champion

@Anonymous

 

Hi, Try with:

 

ALL Sales = CALCULATE([Total Sales];ALLSELECTED(DimProduct[EnglishProductName]))




Lima - Peru
Anonymous
Not applicable

Thank you very much for the reply.
One more question, is it possible to add only to the grand total the sum of sales of the product highlighted as yellow ?

Thank you once again.

question2.JPG

 

 

dilumd
Impactful Individual
Impactful Individual

Hi,

 

SUM = Like excel sum of all the rows

SUMX = calculate sum by multiplying each raw by raw

ALL = What all function does is it ignores all the filters and calculate the sum as your using calculate function. (this act as a filter)

ALLEXCEPT = this function ignores all filters other than the field which you select

 

Useful links on popular DAX functions are as follows,

 

https://www.youtube.com/playlist?list=PLDz00l_jz6zym_YP8ZW11o52niGfCP8pN

 

https://msdn.microsoft.com/en-us/library/ee634396.aspx

 

Hope this helps

 

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.