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!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hi community!
Power bi is having problems to create a "Calendar Table" using my code (which in my opinion is correct).
After I provided the code (please check below), I get the next error: "Cannot identify the table that contains [Date] column."
I need the table to create a relation between my other two tables (both tables have multiples records in their respective "Date" columns, and the data type of those columns is "Date".
Do you know what's wrong? As you can see, indeed the table and column to which I'm making reference exists and are correct (I provide an screen shot of my two single tables in the model).
CODE:
Solved! Go to Solution.
Hi @Miguel_Rojo
The problem is in the expressions for "Max Year" and "Max Month".
The MAX function must take a column reference from a physical table as its argument.
Did you want these to be the overall maximum year/month appearing in the Calendar Table?
If so you could write this (since the maximum date is already contained in the variable __End_Date )
"Max Year", YEAR( __End_Date ),
"Max Month", MONTH( __End_Date )
If that's not what you wanted, please post back to clarify what you wanted these values to be.
Regards
Owen
Hi @Miguel_Rojo
The problem is in the expressions for "Max Year" and "Max Month".
The MAX function must take a column reference from a physical table as its argument.
Did you want these to be the overall maximum year/month appearing in the Calendar Table?
If so you could write this (since the maximum date is already contained in the variable __End_Date )
"Max Year", YEAR( __End_Date ),
"Max Month", MONTH( __End_Date )
If that's not what you wanted, please post back to clarify what you wanted these values to be.
Regards
Owen
Thanks Owen!!, you were right!, I was selecting an unexisting table using the MAX() function; I changed the code by:
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
User | Count |
---|---|
12 | |
12 | |
10 | |
9 | |
9 |