Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hi, we have a scenario were users need to filter a table based on a combination of columns B & C selections with column C being a range of values. Haven't found a solution that works so hoping someone in the communtity can help.
Hope this example is clear, thanks!
Solved! Go to Solution.
Thanks for the reply from Idrissshatila.
Hi @jdog05 ,
Using the sample data you gave me, I achieved your desired effect by creating two new tables for columns B and C respectively that have no relation to the original table, here are my steps:
1.Use the VALUES function to create new tables for columns B and C to use as slicer fields.
B1 = VALUES('Table'[B])
B2 = VALUES('Table'[B])
C1 = VALUES('Table'[C])
C2 = VALUES('Table'[C])
2.Create four slicers:
3.Create a meausre and filter the table:
Measure =
IF(
(
(SELECTEDVALUE('Table'[B]) = SELECTEDVALUE('B1'[B]) &&
SELECTEDVALUE('Table'[C]) >= MIN('C1'[C]) &&
SELECTEDVALUE('Table'[C]) <= MAX('C1'[C]))
||
(SELECTEDVALUE('Table'[B]) = SELECTEDVALUE('B2'[B]) &&
SELECTEDVALUE('Table'[C]) >= MIN('C2'[C]) &&
SELECTEDVALUE('Table'[C]) <= MAX('C2'[C]))
),
1,
0
)
Best Regards,
Zhu
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
Thanks for the reply from Idrissshatila.
Hi @jdog05 ,
Using the sample data you gave me, I achieved your desired effect by creating two new tables for columns B and C respectively that have no relation to the original table, here are my steps:
1.Use the VALUES function to create new tables for columns B and C to use as slicer fields.
B1 = VALUES('Table'[B])
B2 = VALUES('Table'[B])
C1 = VALUES('Table'[C])
C2 = VALUES('Table'[C])
2.Create four slicers:
3.Create a meausre and filter the table:
Measure =
IF(
(
(SELECTEDVALUE('Table'[B]) = SELECTEDVALUE('B1'[B]) &&
SELECTEDVALUE('Table'[C]) >= MIN('C1'[C]) &&
SELECTEDVALUE('Table'[C]) <= MAX('C1'[C]))
||
(SELECTEDVALUE('Table'[B]) = SELECTEDVALUE('B2'[B]) &&
SELECTEDVALUE('Table'[C]) >= MIN('C2'[C]) &&
SELECTEDVALUE('Table'[C]) <= MAX('C2'[C]))
),
1,
0
)
Best Regards,
Zhu
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
Hello @jdog05 ,
then you can add two slicers, first one is a drop down slicer that shows the data of column B and the second is a between slicers.
Proud to be a Super User! | |
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
86 | |
78 | |
54 | |
39 | |
35 |
User | Count |
---|---|
102 | |
84 | |
48 | |
48 | |
48 |