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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
coliveira03_
Frequent Visitor

Total using ALL in a DAX

Hi there,

In my data set, I have many folders and in each folder, many products inside
e.g.: 

 

coliveira03__2-1687274928220.png

I need to user a slicer using product type description field, and when doing so automatically we have only the lines that contains this description

 

coliveira03__3-1687275012012.png

however, I need the folder TOTAL value - I have done the following dax and solves half of the problem

coliveira03__4-1687275278590.png

coliveira03__6-1687275441741.png

 

it does give me the folder total by line, but the total is a completly bigger number

I know once i am using all, is ignoring the filter applied by the slicer, and for that reason

But i am looking for another solution

 

ps.: i have summerized a new table with folder number and product type description, and in this case works.

 

coliveira03__9-1687275983779.png

 

however I work with a huge dataset already, and doing this I am only making bigger

 

 

I have tried many different ways and nothing seems to work - any help or insights are really appreciated

 

Many Thanks

 

1 ACCEPTED SOLUTION
tamerj1
Super User
Super User

Hi @coliveira03_ 

Please try

Sales Total =
SUMX (
DISTINCT ( Folder[FolderNumber] ),
CALCULATE ( SUM ( Folder[SellAmount] ), ALL ( Folder[ProductTypeDescription] ) )
)

View solution in original post

2 REPLIES 2
tamerj1
Super User
Super User

Hi @coliveira03_ 

Please try

Sales Total =
SUMX (
DISTINCT ( Folder[FolderNumber] ),
CALCULATE ( SUM ( Folder[SellAmount] ), ALL ( Folder[ProductTypeDescription] ) )
)

Thank you very much! it worked perfectly


I have done the same sintax before, but in a different order and it made all difference. 

I have no idea why, but i am glad it worked.

 

Thank you

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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

Top Solution Authors