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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
M3IT
Frequent Visitor

Filter out only some rows

My data has a column with one of 3 values - say A, B & C.

I want a table that always displays rows with A or B and a slicer that selects whether C rows are displayed.

So:

     Slicer ticked: Display all data (A, B & C)

     Slicer unticked: Display only rows with A or B

Is this possible?

I'm currently using a simple slicer, but this allows the user to turn off A & B. Is there a way to lock certain values on?

1 ACCEPTED SOLUTION

Hi @M3IT ,

You could try to create a new irrelated table as a slicer. I created a simple sample that you can reference.

  • Create a new table munally

4.PNG

  • Create a measure
Measure = 
var A_B = CALCULATE(SUM('Table 1'[Values]),FILTER('Table 1','Table 1'[Items] = "A" || 'Table 1'[Items] = "B"))
var C = CALCULATE(SUM('Table 1'[Values]),FILTER('Table 1','Table 1'[Items] = "C"))
return
IF(ISFILTERED('Table'[Filter Table]),C,A_B)

 5.PNG6.PNG

Best Regards,

Xue Ding

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
AndrejZitnay
Post Patron
Post Patron

Hello @M3IT 

 

I would recomment to look into slicer control and change setting. 

 

You can add filters as well to whole report, page or individual visual. 

 

I would recomend for you to look into guided learing :

 

https://docs.microsoft.com/en-us/power-bi/guided-learning/

 

This is very helpfull.

 

Slicer Options.JPG

 

 

Filter options.JPG

 

Kind regards.

 

Andrej

Thanks for the response @AndrejZitnay, but nothing in the suggested learning that I can find answers the question. A basic slicer doesn't do what I need because I want to display some rows regardless of the slicer selection.

Hi @M3IT ,

You could try to create a new irrelated table as a slicer. I created a simple sample that you can reference.

  • Create a new table munally

4.PNG

  • Create a measure
Measure = 
var A_B = CALCULATE(SUM('Table 1'[Values]),FILTER('Table 1','Table 1'[Items] = "A" || 'Table 1'[Items] = "B"))
var C = CALCULATE(SUM('Table 1'[Values]),FILTER('Table 1','Table 1'[Items] = "C"))
return
IF(ISFILTERED('Table'[Filter Table]),C,A_B)

 5.PNG6.PNG

Best Regards,

Xue Ding

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

That's wonderful @v-xuding-msft.

It doesn't do exactly as I was asking for, but with a small amendment it works great.

I changed the Measure to:

 

Measure =
var A_B = CALCULATE(SUM('Table 1'[Values]),FILTER('Table 1','Table 1'[Items] = "A" || 'Table 1'[Items] = "B" ))
var ABC = CALCULATE(SUM('Table 1'[Values]))
return
IF(ISFILTERED('Table'[Filter Table]),ABC,A_B)
 
Thanks
MB

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors