Forum Discussion

PowerMarra's avatar
PowerMarra
Regular Visitor
5 years ago
Solved

Connect week_year with calendar table

Hi,   I have a problem where I have data with year and weeknumber that I need to connect to a calendar table. This must be done with a date key in the fact table, but I am not sure how to produce a...
  • mahoneypat's avatar
    5 years ago

    Assuming your Year and Week columns are Integer type, you can use this expression in a custom column.  You could then make a relationship from a date table to this new column.

     

    = Date.EndOfWeek(Date.AddDays(#date([Year],1,1), ([Week]-1)*7))

     

    Pat