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
verbani007
Frequent Visitor

Filter Slicer

Hi,

 

I'm trying to make a comparing report with 2 slicers. The first slicer is a city. The second slicer is a list of surrounding cities (based upon the selection of the first)

I made this possible by creating dax measure the returns is a city is surrounding to a selected city. Then I used this measure to filter the second slicer. This works fine. 

 

Then I have several values that are linked to these slicers. Number of persons would be one of them. I'm using the card visual to show the number of people based upon the first slicer. And a second visual based upon the filtered slicer. And with this last one I have an issue. Although the slicer is filtered, the value showing is the value for all cities (not the values of the filtered cities in my second slicer.)

 

I can apply the filter to the card visual. (I can add him, but can't make a selection)

 

Any idea on how to make sure the card value is showing the figures for the filtered slicer, and nog all values...

 

Regards,

4 REPLIES 4
dearwatson
Responsive Resident
Responsive Resident

Hi verbani

 

we might need an example of the data and the measures to help with this one. 

 

at a guess it sounds like the values are not being filtered by the second slicer because no selection is being made on the second slicer to enable the filter?  

 

I'll try and work it out if you can supply an example?

 

Cheers

Greg

 

"The commonality between science and art is in trying to see profoundly - to develop strategies of seeing and showing." - Edward Tufte

I'll try to give an example:

 

Cities: A, B, C, D, E, F, G

City A is surrounded BY E and F

City B is surrounded BY C, D and G

 

So if I select in my first slicer city B, the second slicer will show C, D and G. (This works perfectly)

 

But under the slicer there is also a card showing the number of people that are living in the city.

 

Lets say that in total there are 2000 people living in all cities.

B has 500 people living in it's city. 

C has 100

D has 150

G has 200

 

So setting the selection of the first slicer to B give me a value in the card of slicer 1 of 500

Setting the first slicer will filter the second slicer to C, D and G. (that is correct)

But the card value under the second slicer will show 2000, instead of that I would expect 100 + 150 + 200 or 450

 

When I do a selection in the second slicer, the value in the second card is correct(!). But this is not the case when no selection is set in the second slicer.

Hi verbani,

 

Is this data in the same table?

 

from the sounds of it there is two tables:

  • one with cities and surrounding cities?  
  • One with cities and population? 

is this correct? or is everything in the same table?

 

theoretically, the model should be a dimension with a row for each city, and a fact table for surrounding cities. if that is the case then you will need a "Surrounding population" column, if these two are related then you can create a calculated column in the surrounding fact table 

 

Surrounding Pop = RELATED(City[Population])

 

Then use the sum of the surrounding population to calculate the value..

 

here's a PBIX that demonstrates: LINK

 

 

 

 

"The commonality between science and art is in trying to see profoundly - to develop strategies of seeing and showing." - Edward Tufte

Hi @verbani007 ,

 

Would you mind sharing your dummy pbix? Make sure the confidential info has been removed before. 

 

We'd like to provide further solution once got it.

 

Best regards,

Dina Ye

Community Support Team _ Dina Ye
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.