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.
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
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
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
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
Thanks for your response. That solution will return the result as range as in from 60001 to 60005 but i want only those 2.
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
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:
and here is sample pbix file, please try it.
Regards,
Lin
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
97 | |
95 | |
80 | |
77 | |
66 |
User | Count |
---|---|
130 | |
106 | |
105 | |
86 | |
72 |