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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Kurren
Helper II
Helper II

Remove row filter from table visual in a measure

I'm sure there is a simple answer that I can't find during my searching.

 

I have a table "Orders" which is being filtered by slicers. I want to add a column called "Total" which repeats the total order value.

Eg orders table:

 

Product, Qty, Value, Total

Pen, 5, $10, $14

Pencil, 10, $1, $14

Eraser, 3, $3, $14

 

Notice how total is the total value of all orders, but repeated. I want the Total measure to be affected by slicers applied to Orders, but unaffected by the row filter in the table. I also want the Total measure to be unaffected if I click a row of the table.

 

So far I have this:

CALCULATE(SUM('Orders'[Value]), REMOVEFILTERS('Orders'), KEEPFILTERS('Product'), KEEPFILTERS('...'), KEEPFILTERS('...'))
 
As you can see I have to repeat KEEPFITLERS for every slicer affecting the table. Is there a more elegant way?
 
Thanks
2 REPLIES 2
TomasAndersson
Solution Sage
Solution Sage

Hi! 
Let me know if I misunderstood, but could ALLSELECTED() be something that helps?

Total Value = 
CALCULATE(
    sum('Orders'[Value]),
    ALLSELECTED('Orders'))

Without slicer

TomasAndersson_0-1671718503513.png
With slicer

TomasAndersson_2-1671718538750.png

 

 

Thanks, but if I click on a row then ALLSELECTED doesn't work.

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.