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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
hass18
Frequent Visitor

Filtering table based on parent value of selected slicer value

Hi, i've searched far and wide for this but cannot find any solution. I have data as below. Ultimately what i want to do is when i select a Store i.e. Store B in a slicer. I would like to filter my visualisation on the corresponding region to that slicer value which would be R1. In that visualisation i would then expect to see Store A, B and C represented. At the moment when i select store B in then my visualisiation will show only that store.

StoreRegion
AR1
BR1
CR1
DR2
ER2
FR2

 

many thanks in advance for your help!

1 ACCEPTED SOLUTION
Arul
Super User
Super User

@hass18 ,

First you have to create separate disconnected table for slicers (store), then use the below code in the measure,

Region = 
 VAR _selectedStore = SELECTEDVALUE('DisconnectedTable'[Store])
 VAR _tempTable = CALCULATE(
     MAX(
         'OriginalTable'[Region]),
         'OriginalTable'[Store] = _selectedStore,ALL('OriginalTable'))
RETURN IF(MAX('OriginalTable'[Region]) = _tempTable, MAX('OriginalTable'[Region]),BLANK())

use the above disconnected table column in the slicer and measure in the table visual.

Arul_0-1690373340030.png





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

Proud to be a Super User!


LinkedIn


View solution in original post

6 REPLIES 6
Arul
Super User
Super User

@hass18 ,

First you have to create separate disconnected table for slicers (store), then use the below code in the measure,

Region = 
 VAR _selectedStore = SELECTEDVALUE('DisconnectedTable'[Store])
 VAR _tempTable = CALCULATE(
     MAX(
         'OriginalTable'[Region]),
         'OriginalTable'[Store] = _selectedStore,ALL('OriginalTable'))
RETURN IF(MAX('OriginalTable'[Region]) = _tempTable, MAX('OriginalTable'[Region]),BLANK())

use the above disconnected table column in the slicer and measure in the table visual.

Arul_0-1690373340030.png





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

Proud to be a Super User!


LinkedIn


hass18
Frequent Visitor

Hi thanks so much for responding. I did exactly as you said but it doesn't seem to be working. I created a disconnected table using the below and used the measure as a column in the table but it seems to only return values from the max region even (in this case R23) even though no store is selected that belongs to R23

StoreList = Summarize(OriginalTable,OriginalTable[Store])


@hass18 ,

In my testing file it is showing blank if you are not selecting anything in the slicer. Can you refer the file attahced?

 





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

Proud to be a Super User!


LinkedIn


hass18
Frequent Visitor

Sorry completely my fault, i noticed a made an incorrect reference in the code you supplied. Its now working perfectly. You are amazing! thankyou so much

DataVitalizer
Solution Sage
Solution Sage

Hi @hass18 

To make sure I undersood your request, are you trying to exclude the selected value in the slicer from the visual?

Did it work ? 👌 Mark it as a solution to help spreading knowledge 👉 A kudos would be appreciated

i'm trying to only show stores in the visualisation that belong to the region of the selected store. i.e. User selects Store B > that belongs to R1 > therefore the visualisation should show Stores A, B, C

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.