Forum Discussion

ClemFandango's avatar
ClemFandango
Advocate II
2 years ago
Solved

Create date table between two dates and add a column from another table

Hi there,   I would like to create a new date table for every end of month between 31/01/2018 & 31/12/2028, but including the 'country consolidated' field as an extra column found within 'table1' b...
  • DataInsights's avatar
    2 years ago

    ClemFandango,

     

    Try this calculated table:

     

    DatesWithCountry =
    VAR vCalendar =
        CALENDAR ( DATE ( 2018, 1, 1 ), DATE ( 2028, 12, 31 ) )
    VAR vCalendarEOM =
        FILTER ( vCalendar, [Date] = EOMONTH ( [Date], 0 ) )
    VAR vCountries =
        VALUES ( Table1[Country Consolidated] )
    VAR vResult =
        GENERATE ( vCalendarEOM, vCountries )
    RETURN
        vResult