Forum Discussion
Power BI/DAX: dynamically filter table values with slicer
- Anonymous1 year ago
Hi, testingname
You can try the following methods. Create a new slicer table.
Slicer = VALUES('Table'[Monthly Report])Measure = Var _rank= CALCULATE(MAX('Table'[Monthly Rank]),FILTER(ALL('Table'),[Monthly Report]=SELECTEDVALUE(Slicer[Monthly Report]))) RETURN IF(SELECTEDVALUE('Table'[Monthly Rank])<=_rank&&SELECTEDVALUE('Table'[Monthly Rank])>=_rank-5,1,0)Is this the result you expected?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, testingname
You can try the following methods. Create a new slicer table.
Slicer = VALUES('Table'[Monthly Report])Measure =
Var _rank= CALCULATE(MAX('Table'[Monthly Rank]),FILTER(ALL('Table'),[Monthly Report]=SELECTEDVALUE(Slicer[Monthly Report])))
RETURN
IF(SELECTEDVALUE('Table'[Monthly Rank])<=_rank&&SELECTEDVALUE('Table'[Monthly Rank])>=_rank-5,1,0)
Is this the result you expected?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you for your response Anonymous.
This appears to be successful!
I'm using the new "Monthly Report" column from the new "Slicer" table as the Slicer Field column.
The original "Monthly Report" column from the original table is still used in the table column.
The new "measure" from the "Slicer" table is then placed as a filter on each visual (Show items when the value 'is greater than 0').
See sample images below(not enough historical data to go back 6 months in most cases but it will work in the future)
Thanks also to MFelix for taking the time to investigate.