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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

How do I subset rows of a table

Im using a grouped by table like this:

Sales CenterSales DocOutlier 1Outlier 2
A12310
B45610
B78911
C11201

To create a bar chart of distinct count of sales doc numbers by profit center. I want to add a slicer with options Outlier 1 and Outlier 2

 

I want to subset the table above by the options on my slicer. For example: If I select Outlier 1, I want the first three rows in my table (with a value of 1) and my bar graph to use the new subset of the table. 

 

I'm very new to Power BI, and I'm trying to do this with a Switch Statement Measure but it's not working. If anyone has started code for this I would very much appreicate it.

2 REPLIES 2
Anonymous
Not applicable

@Anonymous  how are you getting the value of outlier1 & outlier 2 

Kindly provide the sample PBIX file .

 

 

camargos88
Community Champion
Community Champion

Hi @Anonymous ,

 

Check if the attached file helps you.

I've unpivoted the outliers columns and filtered the page to get only values with 1.

 



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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