Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Dear,
I need a help in doing the YTD media, and for the current year (2019) I have value until February, for other months this is like zero because I do not have the values yet.
As in the picture above I can not count on zeros, however, in a few months of last year for example I have zero that I need to count in YTD.
Solved! Go to Solution.
Hello Teige,
Thanks for the answer!
I'll try to build based on that calendar. But are we bringing in every month of 2019? Well, I need to get them in what you referred to as zero.
The year to date would be an average of the year, but in 2019 with the zeroes that have the average.
Best Regards,
Douglas
Hi DouglasFranco,
Could you please share the sample data and expected result to us? Based on my understanding, you want to calculate the average YTD.
In this scenario, we can create a calendar table using the following query:
calendar = ADDCOLUMNS(CALENDARAUTO(),"year",YEAR([Date]),"month",MONTH([Date]),"month/year",FORMAT([Date],"mmm")&"/"&YEAR([Date]))
Then create relationship between calendar table and data table, then we can use the following query to calculate the average YTD:
ytd2018 = TOTALYTD(AVERAGE(Data2018[KPIS]),'calendar'[Date]) ytd2019 = TOTALYTD(AVERAGE(Data2019[KPIS]),'calendar'[Date])
The result will like below:
Best Regards,
Teige
Hello Teige,
Thanks for the answer!
I'll try to build based on that calendar. But are we bringing in every month of 2019? Well, I need to get them in what you referred to as zero.
The year to date would be an average of the year, but in 2019 with the zeroes that have the average.
Best Regards,
Douglas
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 66 | |
| 47 | |
| 43 | |
| 26 | |
| 19 |
| User | Count |
|---|---|
| 196 | |
| 127 | |
| 102 | |
| 67 | |
| 49 |