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
ThomasSan
Helper III
Helper III

Using filtered value for further calculations

Hi everyone,

 

I would like to use the total of a table element of a filtered table in a further DAX calculation.

 

Example:

 

ThomasSan_0-1635790994821.png

I would like to use the total of Number of Invoices (here the number 3385) in another DAX calculation. This calculation would generate the measure Y that stems from the formula Y = X / '3385 Number of Invoices' . What is the correct DAX formula that puts the filtered sum of Number of Invoices into the denominator?

 

(I have already tried sum(Table1[Number Of Invoices]) but that gives me the total sum of Number of Invoices which - in my case -  is something around 9bn. Obviously, this is the sum of Number of Invoices that stems from the total data set (i.e. which has not been filtered according to my specifications).)

 

Can anyone help, please?

1 ACCEPTED SOLUTION
AlexisOlson
Super User
Super User

Try this (assuming you don't have other table):

VisualTotal = CALCULATE ( SUM ( Table1[Number Of Invoices] ), ALLSELECTED ( Table1 ) )

 

View solution in original post

2 REPLIES 2
AlexisOlson
Super User
Super User

Try this (assuming you don't have other table):

VisualTotal = CALCULATE ( SUM ( Table1[Number Of Invoices] ), ALLSELECTED ( Table1 ) )

 

cool, thank you, learnt another important bit of DAX today 🙂

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