Forum Discussion

Daxer12's avatar
Daxer12
Helper I
6 years ago
Solved

append two tables using measure

Hi guys,   I have a table which looks like the following: Project phases startDate (as a measure) endDate (as a measure) EstCost A a1 1/01/2020 1/08/2020 100 A a2 1/08/2020 1/0...
  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi Daxer12 ,

     

    1.Create a calendar table. There is no relationship between two tables.

     

    Calendar =
    ADDCOLUMNS (
        CALENDAR ( DATE ( 2020, 1, 1 ), DATE ( 2021, 12, 31 ) ),
        "MonthYear",
            FORMAT ( [Date], "MMM" ) & "-"
                & FORMAT ( [Date], "YY" ),
        "Sort", FORMAT ( [Date], "YYYYMM" )
    )

     

     

    2.Create a measure and put it into Filters to filter table.

     

    Measure =
    IF (
        MIN ( 'Calendar'[Date] ) >= 'Table'[startDate]
            && MIN ( 'Calendar'[Date] ) < [endDate],
        1,
        0
    )

     

     

     

    You can check more details from here.

     

     

     

    Best Regards,
    Stephen Tao

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.