Forum Discussion
Common Slicer for Same Value Type Within Same Table
Hi,
I have a table that contains below columns as % as well as some other values as time stamp.
Load 1, Load 2, Load 3, Load 4
These are loads for 4 different equipment. I have a graph for each of these equipment and I would like to use a single slicer as load (from 0-100) to filter all 4 of these graphs at the same time.
First I created a table with loads from 0-100 and created relationships with each of my load columns. But later I remembered that I can only create a relationship with one of them, thus only this one would get filtered out.
Is there a way that I can create a common slicer for these values without having to split them into different tables?
2 Replies
- amitchandak
Super User
numersoz , You can activate a relation using userelation in a measure. So you can create 4 measure or 4 formula inside on measure and use that. Refer to this example which shows the same on the date
Please Watch/Like/Share My webinar on Time Intelligence: https://community.powerbi.com/t5/Webinars-and-Video-Gallery/PowerBI-Time-Intelligence-Calendar-WTD-YTD-LYTD-Week-Over-Week/m-p/1051626#M184
My Youtube Tips at: https://www.youtube.com/playlist?list=PLPaNVDMhUXGYrm5rm6ME6rjzKGSvT9Jmy
Appreciate your Kudos. - v-alq-msft
Community Support
Hi, numersoz
Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.
Table:
Test:
You may create four measures as below.
Isdisplay1 = var _min = CALCULATE(MIN(Test[Percentage]),ALLSELECTED(Test)) var _max = CALCULATE(MAX(Test[Percentage]),ALLSELECTED(Test)) var _load1 = SELECTEDVALUE('Table'[Load 1]) return IF( _load1>=_min&&_load1<=_max, 1,0 ) Isdisplay2 = var _min = CALCULATE(MIN(Test[Percentage]),ALLSELECTED(Test)) var _max = CALCULATE(MAX(Test[Percentage]),ALLSELECTED(Test)) var _load2 = SELECTEDVALUE('Table'[Load 2]) return IF( _load2>=_min&&_load2<=_max, 1,0 ) Isdisplay3 = var _min = CALCULATE(MIN(Test[Percentage]),ALLSELECTED(Test)) var _max = CALCULATE(MAX(Test[Percentage]),ALLSELECTED(Test)) var _load3 = SELECTEDVALUE('Table'[Load 3]) return IF( _load3>=_min&&_load3<=_max, 1,0 ) Isdisplay4 = var _min = CALCULATE(MIN(Test[Percentage]),ALLSELECTED(Test)) var _max = CALCULATE(MAX(Test[Percentage]),ALLSELECTED(Test)) var _load4 = SELECTEDVALUE('Table'[Load 4]) return IF( _load4>=_min&&_load4<=_max, 1,0 )Then you need to put these measures in the corresponding visual level filters to display the result.
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.