Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
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 🙂
User | Count |
---|---|
96 | |
87 | |
78 | |
72 | |
68 |
User | Count |
---|---|
113 | |
105 | |
84 | |
65 | |
64 |