cancel
Showing results for
Did you mean:

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a \$100 discount. Register Now

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.

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
Community Champion

@Anonymous

Hi, Try with:

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

Lima - Peru
3 REPLIES 3
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.

Solution Supplier

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://msdn.microsoft.com/en-us/library/ee634396.aspx

Hope this helps

Announcements

#### Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

#### Power BI Monthly Update - February 2024

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

#### Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

#### Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors
Top Kudoed Authors