Forum Discussion
Counting Unique Values Level based on last timestamp
- 2 years ago
Hi aabi please create another column to check true false last date for customer
True False LastDateForCustomer = Sheet1[MaxDatePerCutomer]=Sheet1[Timestamp].After that create overvies as shown on Output (slice True)Did I answer your question? Kudos appreciated / accept solution!
Output
Hi aabi
If this is solution, please accept it so other member of community could use it. Thank you
Hi some_bih
While what you made kind of works, but is not something that I can use on my model.
However with your assistance/inspiration, I have managed to create the formula that I need as follows :
Level 1 Count = VAR LatestTimestampPerCustomer =
ADDCOLUMNS(
SUMMARIZE(
'Table1',
'Table1'[CustomerID],
"MaxTimestamp", MAX('Table1'[Timestamp])
),
"LatestLevel",
CALCULATE(
MAX('Table1'[Level]),
FILTER(
'Table1',
'Table1'[CustomerID] = EARLIER('Table1'[CustomerID]) &&
'Table1'[Timestamp] = EARLIER([MaxTimestamp])
)
)
)
RETURN
COUNTROWS(
FILTER(
LatestTimestampPerCustomer,
[LatestLevel] = "Level 1"
)
)
I just need to change the "Level 1" to "Level 2" on the countrows for each level. Results will be as follows :
| Level 1 | Level 2 | Level 3 | Level 4 | Level 5 |
| 1 | 2 | 1 | 0 | 1 |