Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
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 | $100 |
| 1/1/2021 | 223 | $100 |
| 1/2/2021 | 100 | $50 |
| 1/3/2021 | 270 | $100 |
| 1/3/2021 | 100 | $100 |
| 1/4/2021 | 223 | $50 |
| 1/5/2021 | 270 | $100 |
| 1/6/2021 | 400 | $100 |
| 1/6/2021 | 550 | $50 |
| 1/6/2021 | 660 | $100 |
| 1/6/2021 | 700 | $100 |
| 1/7/2021 | 100 | $50 |
And I want to produce something that looks like this
| Date | Client Count |
| 1/1/2021 | 2 |
| 1/2/2021 | 2 |
| 1/3/2021 | 3 |
| 1/4/2021 | 3 |
| 1/5/2021 | 3 |
| 1/6/2021 | 7 |
| 1/7/2021 | 7 |
I've already successfully created a table of distinct dates and I've tried to aggregate Client IDs with SUMMARIZECOLUMNS but I've only been able to show the number of distinct IDs that occur on each date.
Solved! Go to Solution.
This looks like a standard cumulative total pattern.
Client Count =
VAR CurrDate = MAX ( dimDate[Date] )
RETURN
CALCULATE ( DISTINCTCOUNT ( Table1[Client ID] ), dimDate[Date] <= CurrDate )
This looks like a standard cumulative total pattern.
Client Count =
VAR CurrDate = MAX ( dimDate[Date] )
RETURN
CALCULATE ( DISTINCTCOUNT ( Table1[Client ID] ), dimDate[Date] <= CurrDate )
You're a wizard Harry
Thank you so much for the help!!!
@mccollough 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]
)
)
)
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.