Forum Discussion
mccollough
Helper I
4 years agoCalculate new clients over time
Let's say you want to trend the number of distinct client ID's over time from a table of invoices. I have an invoice table that looks like this Date Client ID Sale Amount 1/1/2021 100...
- 4 years ago
This looks like a standard cumulative total pattern.
Client Count = VAR CurrDate = MAX ( dimDate[Date] ) RETURN CALCULATE ( DISTINCTCOUNT ( Table1[Client ID] ), dimDate[Date] <= CurrDate )
smpa01
Community Champion
4 years agomccollough you can use a measure like this
Measure =
VAR _date =
MAX ( 'Table'[Date] )
RETURN
COUNTROWS (
EXCEPT (
VALUES ( 'Table'[Client ID] ),
SUMMARIZE (
FILTER ( ALL ( 'Table' ), 'Table'[Date] < _date ),
'Table'[Client ID]
)
)
)