Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hi all,
I have 2 tables with a 1-many relationship. The filter on the 1 side is set to "require single selection", but it's possible to unselect all which causes all data to be displayed. Leaving aside the insanity of this implementation 😋, how can I hide all data if zero filters are selected? HASONEFILTER in a measure gives me the information I need but a visual level filter on that measure (IsFIlteredCorrectly in the screenshot) will not allow me to specify filter out anything - (All) is the only option.
Is there a way to do this?
Solved! Go to Solution.
Thanks for the pointer @amitchandak - for the purposes of the demo above, the measure should be :
Data for Capital table :
IsCapital |
1 |
0 |
Data for Population table :
Country | City | IsCapital | Population |
England | London | 1 | 6000000 |
England | Manchester | 0 | 3000000 |
Scotland | Edinburgh | 1 | 600000 |
Scotland | Glasgow | 0 | 1000000 |
@sandyteenan , Try a measure like this and check in the visual level filter if that 1
Measure = if(CALCULATE(HASONEVALUE('Table'[IsCapital]),ALLSELECTED()) && Maxx(ALLSELECTED('Table'[IsCapital]), 'Table'[IsCapital])=0, 0,1)
I have done that on brand id
Thanks for the pointer @amitchandak - for the purposes of the demo above, the measure should be :
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
84 | |
75 | |
68 | |
41 | |
35 |
User | Count |
---|---|
102 | |
56 | |
52 | |
46 | |
40 |