Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi All,
I created a DATE in PoweBI and other data table(directQuery to database). If I try to create a relationship, it is throwing an error. Screenshot attached -
Can anyone help me to understand what am I doing wrong here? I am fairly new to PowerBI. I have tried to create a relationship with normal excel uploaded file as well but it is still giving me an error. Here is the query for date table I have used -
DATES =
VAR BaseCalendar =
CALENDARAUTO ( 6 )
RETURN
GENERATE (
BaseCalendar,
VAR BASEDATE = [Date]
VAR YEARDATE = YEAR (BASEDATE)
VAR MONTHNUMBER = MONTH (BASEDATE)
RETURN ROW (
"DAY", BASEDATE,
"YEAR", YEARDATE,
"Quarter", "Q" & FORMAT( BaseDate, "Q"),
"MONTH NUMBER", MONTHNUMBER,
"Month", FORMAT ( BaseDate, "mmmm" ),
"Month Short", FORMAT( BaseDate, "mmm"),
"Year Month", FORMAT( BaseDate, "mmmm" ),
"Year Month Short", FORMAT( BaseDate, "yyyy/mmm" ),
"Year Quarter", FORMAT( BaseDate, "yyyy") & "/Q" & FORMAT( BaseDate, "Q"),
"Weekday", FORMAT( BaseDate, "dddd"),
"Week Short", FORMAT( BaseDate, "ddd"),
"WEEK NUMBER", WEEKNUM (BASEDATE),
"Year Month Sort", FORMAT([date], "YYYYMM")
)
)
I would really appreaciate if anyone can help.
Thanks,
Sapna
@Anonymous , Try to use calendar with dates in place of calendarauto and try
DAX Calendar - Standard Calendar, Non-Standard Calendar, 4-4-4 Calendar
https://www.youtube.com/watch?v=IsfCMzjKTQ0&t=145s
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.