I'm trying to generate a table using DAX in PowerBI to use as a date table, however in this case instead of the traditional list of days, I'm trying to generate a list of quarters- specifically the first date of a quarter.
I've tried using CALENDAR to generate days and then convert them to quarters, however I can't seem to find a way to transform the generated days into the first day of the quarter.
QTRMatrix =
ADDCOLUMNS(
STARTOFQUARTER(CALENDAR(MIN(Bookings[InvoiceMonth]),TODAY())),
"Period", "Quarter"
)
This gives me an error stating:
"Function 'STARTOFQUARTER' cannot be used with columns added by ADDCOLUMNS or SUMMARIZE functions."
I've also tried this without ADDCOLUMNS which produces the same error as above.
Could someone please advise how I can achieve this?