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

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

Reply
Anonymous
Not applicable

Check if rows are selected

Hello guys,

 

I have a single Table that records sales transcations for "Products". In my dashboard there are slicers (for "Region" and "Product") that select a certain subset out of my list of transcations. For this subset, I want to check if the rows are selected.

 

Suppose, I slice for "Product B" and "Europe". Then the column IsSelected would look like in the table below.

 

How would you create the column IsSelected?

 

Thanks in advance!

ProductRegionPriceIsSelected
AAmerica30
AEurope20
BAmerica200
BEurope181
BEurope211
BEurope171
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

 

You will need to create two independent slicer tables and use them as slicers.

slicer_p = DISTINCT('Table'[Product])
slicer_R = DISTINCT('Table'[Region])
Then create a measure as below.
Measure = IF(SELECTEDVALUE('Table'[Product]) in VALUES(slicer_p[Product])&&SELECTEDVALUE('Table'[Region]) in VALUES(slicer_R[Region]),1,0)
1.jpg
 
Best Regards,
Jay

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Hi @Anonymous ,

 

You will need to create two independent slicer tables and use them as slicers.

slicer_p = DISTINCT('Table'[Product])
slicer_R = DISTINCT('Table'[Region])
Then create a measure as below.
Measure = IF(SELECTEDVALUE('Table'[Product]) in VALUES(slicer_p[Product])&&SELECTEDVALUE('Table'[Region]) in VALUES(slicer_R[Region]),1,0)
1.jpg
 
Best Regards,
Jay
amitchandak
Super User
Super User

@Anonymous , if they (slicers) are from the same or connected table then

 

if(isblank(countrows(table)) ,0,1)

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

@amitchandak This command gives back a column with ones everywhere, although the slicers are connected to the table. This approach doesnt work for me

@Anonymous ,Try like

 

If( Max(Table[Product])  in allselected(Table[Product])  && Max(Table[Region])  in allselected(Table[Region]) ,1, 0) +0

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

It still doesn't work. Maybe the following would help me understand and solve it:

 

I assumed that ALLSELECTED('table') returns the rows of 'table' that are selected by the slicers. Instead, it returns the entire table. It that normal?

Helpful resources

Announcements
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.