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
Hello Everyone!
I'm facing some difficulties in calculating the YoY Growth (sharing QTD sales vs the same period last year)
I'm using the formula below to calculate the QTD Orders from this year, and the result is coming right
QTD Sales = CALCULATE(COUNT('Orders'[Order Date]),DATESQTD(('Orders'[Order Date])))
The problem is in the formula that calculates the same period from last year:
Last Year QTD Orders = calculate(count(Orders'[Order Date]),DATESQTD(DATEADD('Orders'[Order Date],-1,YEAR)))
It's bringing a higher result than it is.
I don't know if the problem is in my calendar, which was built this way:
Calendar =
var mindate = year(MIN('Orders'[Order Date]))
var maxdate = YEAR(MAX('Orders'[Order Date]))
return
ADDCOLUMNS(
FILTER(
CALENDARAUTO(),
YEAR([Date]) >= mindate && YEAR([Date]) <= maxdate
),
"Year", YEAR([Date]),
"Month", FORMAT([Date],"mmmm"),
"Month_Number", MONTH([Date]),
"Quarter", FORMAT([Date], "\QQ"
)
)
Thanks in advance!!
Make sure that your calendar table is marked as a date table and then use the 'Calendar'[Date] column in the measures rather than the order date column
Hi, thanks for your reply.
I did this and it is now showing the results of the entire quarter in the last year...
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 13 | |
| 5 | |
| 5 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 25 | |
| 10 | |
| 10 | |
| 6 | |
| 6 |