Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Team,
I have a date (which doesn't have continues dates) and quarter fields in my table (mentioned below). My quarter will go as slicer/filter and I want to find the first latest date and the second latest date based on my quarter slicer selection.
Date (DD/MM/YY) | Quarter | Flag | Comment |
02/05/24 | 24-Q2 | 1 | When I selected 24-Q2 |
18/04/24 | 24-Q2 | 2 | When I selected 24-Q2 |
11/04/24 | 24-Q2 | ||
31/03/24 | 24-Q1 | 1 | When I selected 24-Q1 |
29/03/24 | 24-Q1 | 2 | When I selected 24-Q1 |
26/03/24 | 24-Q1 | ||
25/03/24 | 24-Q1 | ||
21/03/24 | 24-Q1 | ||
19/03/24 | 24-Q1 | ||
14/03/24 | 24-Q1 | ||
07/03/24 | 24-Q1 | ||
29/02/24 | 24-Q1 | ||
15/02/24 | 24-Q1 | ||
31/12/23 | 23-Q4 | 1 | When I selected 23-Q4 |
14/12/23 | 23-Q4 | 2 | When I selected 23-Q4 |
Tomorrow when data gets updated and a new date gets added (as mentioned below), my latest and second latest date flag should automatically update
Date (DD/MM/YY) | Quarter | Flag | Comment |
10/05/24 | 24-Q2 | 1 | New date added and the flag should show this as latest date When I selected 24-Q2 |
02/05/24 | 24-Q2 | 2 | Automatically this should be my second latest date When I selected 24-Q2 |
18/04/24 | 24-Q2 | ||
11/04/24 | 24-Q2 | ||
31/03/24 | 24-Q1 | 1 | When I selected 24-Q1 |
29/03/24 | 24-Q1 | 2 | When I selected 24-Q1 |
26/03/24 | 24-Q1 | ||
25/03/24 | 24-Q1 | ||
21/03/24 | 24-Q1 | ||
19/03/24 | 24-Q1 | ||
14/03/24 | 24-Q1 | ||
07/03/24 | 24-Q1 | ||
29/02/24 | 24-Q1 | ||
15/02/24 | 24-Q1 | ||
31/12/23 | 23-Q4 | 1 | When I selected 23-Q4 |
14/12/23 | 23-Q4 | 2 | When I selected 23-Q4 |
Can someone please help me with this requirement?
Thanks!
Solved! Go to Solution.
Hi @AD_SNOW
To get the desired result you can apply an index of every date according to the quarter from PQ .
The guide of how to get this is here :
https://radacad.com/create-row-number-for-each-group-in-power-bi-using-power-query
(Row Number By Group)
I also attached a pbix , you can follow my steps
From the moment that you have an index this is easy, you can create a simple dax measure for the flag :
as I mentioned Pbix is attached 🙂
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.
Thanks Both @Ritaf1983 @KeyurPatel14 . Both the solutions are working as expected. As @Ritaf1983 posted first, I have accepted her solution.
Thanks both again, really appreciated!!
Hi @AD_SNOW
To get the desired result you can apply an index of every date according to the quarter from PQ .
The guide of how to get this is here :
https://radacad.com/create-row-number-for-each-group-in-power-bi-using-power-query
(Row Number By Group)
I also attached a pbix , you can follow my steps
From the moment that you have an index this is easy, you can create a simple dax measure for the flag :
as I mentioned Pbix is attached 🙂
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Ask questions in Eventhouse and KQL, Eventstream, and Reflex.
User | Count |
---|---|
88 | |
82 | |
66 | |
64 | |
57 |
User | Count |
---|---|
171 | |
111 | |
109 | |
72 | |
71 |