March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi All,
I need some help putting together a DAX query using the below example. I have a dataset similar to the below and would need to query the most recent 'Status' for each entity. I've put together a sample dataset to help explain the issue I am facing:
Date (dd/mm/yyyy) | Entity | Status | |
1 | 01/01/2024 | Entity 1 | Inactive |
2 | 01/01/2024 | Entity 2 | Inactive |
3 | 02/01/2024 | Entity 2 | Active |
4 | 03/01/2024 | Entity 1 | Active |
5 | 03/01/2024 | Entity 3 | Active |
6 | 04/01/2024 | Entity 2 | Inactive |
I'm trying to see how I can retrieve the most recent Status for each Entity listed. With the above data, I would expect a response to show the following data:
- Entity 1: Active
- Entity 2: Inactive
- Entity 3: Active
Any assistance that could be provided would be greatly appreciated!
Thanks!
@Ahmedx - Thanks for that. It had worked to a certain extent. Looking how I am retrieving / reporting the data, I am amending the original query.
Still using the below table as an example:
Date (dd/mm/yyyy) | Entity | Status | |
1 | 01/01/2024 | Entity 1 | Inactive |
2 | 01/01/2024 | Entity 2 | Inactive |
3 | 02/01/2024 | Entity 2 | Active |
4 | 03/01/2024 | Entity 1 | Active |
5 | 03/01/2024 | Entity 3 | Active |
6 | 04/01/2024 | Entity 2 | Inactive |
Is there a way for me to count the most recent status for each entity? The result will return the number based on the requested status within the query. If I query for 'Inactive' status, I would like to see '1' as the result since Entity 2 is the most recent entity to appear as Inactive. If I query for 'Active' status, I would like to see '2' as the result since 'Entity 1' and 'Entity 3' has their most recent status as Active.
Hope that makes sense.
I can’t understand the number 1 and 2 based on what
can you explain the logic in detail
and give a few examples where 1 or 2 or 3 suddenly exist
Thanks - will give it a go 🙂
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
114 | |
76 | |
57 | |
52 | |
44 |
User | Count |
---|---|
167 | |
117 | |
63 | |
57 | |
50 |