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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Visual level filters not working in my report

Hi, 

 

I have a dashboard which a table Countries which depends on two measures as slicers: Continent and Currency. The first one is selected with a slicer and the second one, on a table Currency. I want the registries on the Countries table only  when a continent is selected on the slicer and a currency on the table. To do so, I have created two measures: 

 

 

continent= if(calculate(distinctcount('continent'[continent_name]),allselected('continent'[continent_name]))=1,"Y","N")
currency= if(calculate(distinctcount('currency'[currency_name]),allselected('currency'[currency_name]))=1,"Y","N")

 

 In both cases, when a continent and currency is selected, I want the countries table to be shown. But, as you can see in the screenshot, Country is returning values (BA and GE) even if currency's value is 'N'. Why is this happening? I'm struggling with this since yesterday and I'm not able to find a solution 😞 Am I using visual-level filters wrong?
problem_powerbi.png

 

Thanks for your attention and help .

1 ACCEPTED SOLUTION

Hi @Anonymous ,

Based on your description, I have created this sample table:

tb.png

Create this visual control measure, put it in the visual filter of currency table and country table, set its value as 1:

visual control =
IF (
    NOT ISFILTERED ( 'Table'[Contient] ),
    0,
    IF ( NOT ISFILTERED ( 'Table'[Currency] ), 0, 1 )
)

vc.png

When select a contient in a slicer:

r1.png

Then select a currency in the currency table:

r2.png

Attached my sample file in the below, hopes to help you.

 

Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@Anonymous , Not very clear but try >= and check

continent= if(calculate(distinctcount('continent'[continent_name]),allselected('continent'[continent_name]))>=1,"Y","N")
currency= if(calculate(distinctcount('currency'[currency_name]),allselected('currency'[currency_name]))>=1,"Y","N")
Anonymous
Not applicable

Hi @amitchandak , sorry, but this didn't solve my  issue 😞 When I choose a continent, both currency and countries table are inmediately populated, and this is not the behaviour I'd like to have. I'll try to explain clearer with an example of use:

1. The user should select a continent. Before selecting this continent, tables Currency and Country must appear empty (with no registries)

2. When the user selects a continent, the possible currencies appear, but the Country table must remain empty

3. Only when a currency is chosen in the table, the Countries will appear. 

This is the logic I'd like to  use, but apart from this, I don't understand why I'm applying  a filter but this filter doesn't seem to work. Have visual level filters a logic or hierarchy I'm ignoring?

Hi @Anonymous ,

Based on your description, I have created this sample table:

tb.png

Create this visual control measure, put it in the visual filter of currency table and country table, set its value as 1:

visual control =
IF (
    NOT ISFILTERED ( 'Table'[Contient] ),
    0,
    IF ( NOT ISFILTERED ( 'Table'[Currency] ), 0, 1 )
)

vc.png

When select a contient in a slicer:

r1.png

Then select a currency in the currency table:

r2.png

Attached my sample file in the below, hopes to help you.

 

Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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