Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 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 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