The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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 :