Forum Discussion
DAXify Slicer
I got 30 minute interval test results in the dataset represented in charts.
What DAX could be hooked to the slicer for user to select to show most recent N entries ?
Say the user selects on the slicer 2, only the most recent 2 time entries should be filtered to.
Input
Device Time Result
Mobile1 08/27/2020 7:00 am Fail
Mobile1 08/27/2020 6:30 am Pass
Mobile1 08/27/2020 6:00 am NA
Mobile1 08/27/2020 5:30 am Fail
Mobile1 08/27/2020 5:00 am Pass
Mobile1 08/27/2020 4:30 am Fail
Output
Device Time Result
Mobile1 08/27/2020 7:00 am Fail
Mobile1 08/27/2020 6:30 am Pass
curiouspbix0
Go to Modeling TAB, and create a Parameter:
Create the following Measure:Recent = IF( RANKX(ALLEXCEPT(Table02,Table02[Device]),CALCULATE(MAX(Table02[Time])),,DESC)<= Parameter[Parameter Value], 1, 0 )Add the new measure to the visual filter and set it 1. You selection should filter the top selected n rows
________________________
If my answer was helpful, please consider Accept it as the solution to help the other members find it
Click on the Thumbs-Up icon if you like this reply 🙂
1 Reply
- FowmySuper User
curiouspbix0
Go to Modeling TAB, and create a Parameter:
Create the following Measure:Recent = IF( RANKX(ALLEXCEPT(Table02,Table02[Device]),CALCULATE(MAX(Table02[Time])),,DESC)<= Parameter[Parameter Value], 1, 0 )Add the new measure to the visual filter and set it 1. You selection should filter the top selected n rows
________________________
If my answer was helpful, please consider Accept it as the solution to help the other members find it
Click on the Thumbs-Up icon if you like this reply 🙂