Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I am building a visual for a user that wants to see the last 5 times an update has been submitted. So I have an ID field that will have multiple dates associated with each ID. I can get the dates combined into a single cell, but they are out of order.
Here is a view of the data:
The Formula I have in the CombineDates field is currently:
Solved! Go to Solution.
Hi @ColinA ,
First, we figurt out that we need CONCATENATEX() function to combine all the date, so the problem is how to get the last 5 date. TopN() to get the result.
So DAX expression like the following:
expected result =
VAR _top =
TOPN ( 5, FILTER ( 'table', [ID] = EARLIER ( 'table'[ID] ) ), [date], DESC )
RETURN
CONCATENATEX ( _top, [date], " " )
Modify this measure to suit your model.
Best Regards
Community Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Ideally the new column would retain only the latest 5 dates per ID, and would order them before concatenating them with a delimiter.
@ColinA
What is your expected result? Share screenshot
Proud to be a Super User! | |
Sorry, posted this in the wrong location. Ideally the new column would retain only the latest 5 dates per ID, and would order them before concatenating them with a delimiter.
Hi @ColinA ,
First, we figurt out that we need CONCATENATEX() function to combine all the date, so the problem is how to get the last 5 date. TopN() to get the result.
So DAX expression like the following:
expected result =
VAR _top =
TOPN ( 5, FILTER ( 'table', [ID] = EARLIER ( 'table'[ID] ) ), [date], DESC )
RETURN
CONCATENATEX ( _top, [date], " " )
Modify this measure to suit your model.
Best Regards
Community Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
User | Count |
---|---|
75 | |
75 | |
45 | |
31 | |
27 |
User | Count |
---|---|
99 | |
89 | |
52 | |
48 | |
46 |