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

Filering using 2 slicers on same column without any dependancy

Hello All,

 

Thanks for reading my query. I have a requirement where I have two slicer for the same column. For ex, take the below data

Capture2.PNG

 

I need two slicers on Zip column say Start zip and End Zip. When I select 60001 in slicer1 and 60005 in slicer2, I should get the result as

Capture1.PNG

60001   1

60005   2

 

The Problem here is when i select 60001 in slicer1 the data gets filtered for that and when i further select 60005 in slicer2 there is no data as i already filtered for 60001.

I tried all the possibilities that i can but nothing helped. Please let me know if this can be accomplished using dax or any other solution.

 

Please share all your suggestions. Thanks in advance.

 

-Nith

 
 
5 REPLIES 5
Anonymous
Not applicable

Hi @Anonymous,

 

You can duplicate the column and turn into number that column, when you put it on a slicer it will be like a date filtering, you select between and can select the beginning and the end.

 

Let me know if it helped, if so mark as solution.

 

BR,

DR

Anonymous
Not applicable

Thanks for your response. That solution will return the result as range as in from 60001 to 60005 but i want only those 2.

Anonymous
Not applicable

Alright I think I've figured what you're aiming.

 

You have to make two diferent tables for that, can't filter from the same since the data in your table must have two columns, one for the Departure ZIP and other for the Destination Zip am I right?

 

BR,

DR

Anonymous
Not applicable

Exactly that is what i'm looking for. I created two tables for slicer with all the values but couldn't filter as expected.

I don't want to duplicate the entire table as it has large volume of data.

hi @Anonymous 

If so, you could try this way:

Step1:

You should use two separate dim zip table for two slicers

use these two formula create the dim zip table and don't create any relationshop.

For slicer1 = VALUES('Table'[ZIP])

For slicer2 = VALUES('Table'[ZIP])

Step2:

Then use this formula to create a measure

Measure = var _selectedzips=UNION(VALUES('For slicer1'[ZIP]),VALUES('For slicer2'[ZIP])) return
CALCULATE(SUM('Table'[Optimized value]),FILTER('Table','Table'[ZIP] in _selectedzips
))

Step3:

When create visuals, use this measure instead of [Optimized value]

Result:

5.JPG

and here is sample pbix file, please try it.

 

Regards,

Lin

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