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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Power_It_Up
Helper II
Helper II

Selecting a particular value in a filter to return the total of all values

Hi there.

 

Simple table below.  If I filter on Person 'A', I want the SCORECARD to show 185.  Otherwise, show the corresponding Total of the selected Person, i.e. 'B' = 20, 'C' = 30,  and so on.

 

Power_It_Up_0-1711129674811.png

 

Many thanks in advance.

1 ACCEPTED SOLUTION
QuentinBl
Helper I
Helper I

Hello, 
this measure should do the work :

Dax = IF(SELECTEDVALUE('Exemple 2'[Person]) = "A",CALCULATE(SUM('Exemple 2'[total]),ALL('Exemple 2'[Person])),SUM('Exemple 2'[total]))

It can be imporved with a 'switch' instead of a 'if' if you get other tests to do.
QuentinBl_0-1711131137977.png


If you want your total to be corresponding to the new value shown in A, you can switch to this DAX with a SUMX :

Dax = SUMX('Exemple 2', IF('Exemple 2'[Person] = "A",CALCULATE(SUM('Exemple 2'[total]),ALL('Exemple 2')),'Exemple 2'[total]))
QuentinBl_1-1711131601055.png

 



 



View solution in original post

3 REPLIES 3
Power_It_Up
Helper II
Helper II

@QuentinBl Many thanks for this example. I shall try it soon. 👍

Anonymous
Not applicable

Hi, @Power_It_Up 

Your solution is great, @QuentinBl . It worked like a charm! Has your current issue been resolved?

 

 

Best Regards

Jianpeng Li

 

 

QuentinBl
Helper I
Helper I

Hello, 
this measure should do the work :

Dax = IF(SELECTEDVALUE('Exemple 2'[Person]) = "A",CALCULATE(SUM('Exemple 2'[total]),ALL('Exemple 2'[Person])),SUM('Exemple 2'[total]))

It can be imporved with a 'switch' instead of a 'if' if you get other tests to do.
QuentinBl_0-1711131137977.png


If you want your total to be corresponding to the new value shown in A, you can switch to this DAX with a SUMX :

Dax = SUMX('Exemple 2', IF('Exemple 2'[Person] = "A",CALCULATE(SUM('Exemple 2'[total]),ALL('Exemple 2')),'Exemple 2'[total]))
QuentinBl_1-1711131601055.png

 



 



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.