Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now
Hi there,
I have a requirement to only show the next 5 tasks that are taking place in a table of tasks, I tried using the Top N filter in the filter pane, and it didn't take into account if I filtered it to one project above a task(I want to see the next 5 future tasks by project). I tried to remake the calculation using rankx eg.
Solved! Go to Solution.
Hi @MarkPHarris1 ,
According to my understanding, you want to display the next 5 rows which date is later than today , right?
You could use the following formula:
top5 =
IF (
SELECTEDVALUE ( TaskTable[Taskdate] )
IN TOPN (
5,
FILTER (
CALCULATETABLE ( DISTINCT ( TaskTable[Taskdate] ), ALL ( TaskTable ) ),
TaskTable[Taskdate] > TODAY ()
),
[Taskdate], ASC
),
1,
0
)
Then apply the “top5=1” filter on this visual like this:
Is the result what you want? If not, please upload some data samples and expected output.
Please do mask sensitive data before uploading.
Best Regards,
Eyelyn Qin
Hi @MarkPHarris1 ,
According to my understanding, you want to display the next 5 rows which date is later than today , right?
You could use the following formula:
top5 =
IF (
SELECTEDVALUE ( TaskTable[Taskdate] )
IN TOPN (
5,
FILTER (
CALCULATETABLE ( DISTINCT ( TaskTable[Taskdate] ), ALL ( TaskTable ) ),
TaskTable[Taskdate] > TODAY ()
),
[Taskdate], ASC
),
1,
0
)
Then apply the “top5=1” filter on this visual like this:
Is the result what you want? If not, please upload some data samples and expected output.
Please do mask sensitive data before uploading.
Best Regards,
Eyelyn Qin
Hi @MarkPHarris1 Have a look at this https://www.daxpatterns.com/ranking/
This is the daxpatterns version 2 which includes solutions from Power BI perspective along with samples and videos. I would recommend you go through full page you will find your solution.
Appreciate a Kudos.
Please mark it as solution if this resolves your problem.
Thanks
Check out the October 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
115 | |
112 | |
105 | |
95 | |
58 |
User | Count |
---|---|
174 | |
147 | |
136 | |
102 | |
82 |