This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreDid you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now
I'm trying to calculate a YTD value. Each row in my model should be counted as 1, and multiple rows may have the same timestamp. So for a given period i want to count all of the rows during that period.
My data model has columns [ID], [Timestamp], and i created a numeric column called [count] with a value = 1. I then created a date table and create the relationship between the two on the timestamp column. The relationship is a 1[Date]:*[Timestamp]
My DAX looks like this:
SumOfCount = SUM(tableA[Count])
YTDSumOfCount = TOTALYTD([SumOfCount], DateConsult[Date])
Here is the output i get in a table, and below is the relationship -- I think my Date relationship is broken, but i'm not sure why
There are rules for date tables if you want inbuilt time intelligence to work. Have you followed these rules?
https://exceleratorbi.com.au/power-pivot-calendar-tables/
Also is the data in your data table (timestamp) at the day level (i.e. No timestamp)?
Alos note you dont need the count column. Just use countrows(tablename)
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 35 | |
| 32 | |
| 27 | |
| 23 | |
| 16 |
| User | Count |
|---|---|
| 65 | |
| 50 | |
| 30 | |
| 25 | |
| 24 |