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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
wen2z
New Member

How to show both selected value in the slicer, and the unselected value

Hello Everyone.

I have difficulty on my Power BI.

I want to show the total amount from the Sales Table below.

Order NumberItemAmount
1A100
2B200
3C300
4D400

 

When I filtered it using slicer by order number, the SUM amount that filtered is correct.

The problem is, how to show the Unchecked SUM amount in Card visual on the dashboard??

 

Eg : i checked only 1,2,3 Thus result the sum amount 100+200+300 = 600
i want to display the difference : 4 = 400.

4 REPLIES 4
Dangar332
Super User
Super User

hi, @wen2z 

Try below measure

orsum =
var a = CALCULATE(SUM('order'[amount]),ALLEXCEPT('order','order'[amount]))
var b = SUM('order'[amount])
return ABS(a-b)
 
Dangar332_0-1697780033971.png

 

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.

Hello Dangar, thank you for your feedback.

The measure works. 

But if I combine it with filter by date

Eg: I have 3 years of data (2020 until 2023), and I filtered only to show 2023.

the unselected amount is shows the SUM from 2020 to 2023 plus the document no that I'm not selected.

hi, @wen2z 

use keepfilters inside of var a 

orsum =
var a = CALCULATE(SUM('order'[amount]),ALLEXCEPT('order','order'[amount]),keepfilters('tablename'[datecolumn]))
var b = SUM('order'[amount])
return ABS(a-b)

hi, @wen2z 

here you can check

Dangar332_0-1697784209655.png

here date table seprate and linked with main table

 

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

Feb2025 NL Carousel

Fabric Community Update - February 2025

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