Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Solved! Go to Solution.
Your formula doesn't look too bad, but only as a calculated table which is what CALENDAR is meant for.
I assume both your Sales table and your Forecast table have a [Date] column? First, the best practice is to put the table name before the column name in a formula, so
CALENDAR( MINX(Sales, Sales[Date]), MAXX(Forecast, Forecast[Date]))
In fact, this can be written in a simpler way by not using the table functions MINX and MAXX, but the basic aggregations:
CALENDAR(MIN(Sales[Date]), MAX(Forecast[Date]))
If the last line is the code you're trying to use, the problem there is that MINX expects a scalar value for each row in the table (User_Xref in your case) which is calculated through the expression you provide. This expression is:
FILTER(User_Xref, [LastDT] <> BLANK())
but FILTER returns a subset of the User_Xref table, which probably contains multiple columns. Poor MINX wouldn't know what to compare to what here (even if the table has one column, you would provide multiple rows which wouldn't work either)
Your formula doesn't look too bad, but only as a calculated table which is what CALENDAR is meant for.
I assume both your Sales table and your Forecast table have a [Date] column? First, the best practice is to put the table name before the column name in a formula, so
CALENDAR( MINX(Sales, Sales[Date]), MAXX(Forecast, Forecast[Date]))
In fact, this can be written in a simpler way by not using the table functions MINX and MAXX, but the basic aggregations:
CALENDAR(MIN(Sales[Date]), MAX(Forecast[Date]))
If the last line is the code you're trying to use, the problem there is that MINX expects a scalar value for each row in the table (User_Xref in your case) which is calculated through the expression you provide. This expression is:
FILTER(User_Xref, [LastDT] <> BLANK())
but FILTER returns a subset of the User_Xref table, which probably contains multiple columns. Poor MINX wouldn't know what to compare to what here (even if the table has one column, you would provide multiple rows which wouldn't work either)
Using this code
CALENDAR(MIN(Sales[Date]), MAX(Forecast[Date]))
is closer but now results in this error:
A table of multiple values was supplied where a single value was expected.
Your code starting with 'Test_Column =' suggests that you're trying to create a calculated column, for which the formula should always return a scalar value. CALENDAR returns a table.
Tough to say, something wonky with your data? Not actual date fields? I recreated this and had no issues. See attached, Sales, Forecast and Table.
Weird, I'd try CALENDARAUTO()
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
20 | |
7 | |
6 | |
5 | |
5 |
User | Count |
---|---|
26 | |
10 | |
10 | |
9 | |
6 |