Forum Discussion
DistinctCount values with max date
- 5 years ago
Hi Divous ,
We could first create a measure (date_max) to calculate the last time of each user, then calculate the number of users in different status.
step 1: Add measure (date_max)
date_max = CALCULATE ( MAX ( 'max date'[date] ), FILTER ( ALL ( 'max date' ), 'max date'[user] = MAX ( 'max date'[user] ) ) )step 2: Add measure(count )
count = CALCULATE ( COUNTROWS ( 'max date' ), FILTER ( 'max date', [date] = [date_max] ) )The final output is shown below:
Best regards,
Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Why should the answer for bbb be lost. Shouldn't it be in_progress? Also, share data in a form that can be pasted in an MS Excel file.
Hi Ashish_Mathur,
thanks for your response!
My table was just a simplified example, sorry. So I'm attaching original data, from which it will be clearer:
https://ufile.io/fg3zpaog
There may be the same status for the user, as the process may start multiple times - sometimes end in done, other times in_progress, or fail at all (lost), or he finished, but without data (no_data).
- Ashish_Mathur5 years agoSuper User
Hi,
On a smaller dataset show me the expected result in another tab of the Excel file.