Forum Discussion

Ashoop2020's avatar
Ashoop2020
Frequent Visitor
3 years ago
Solved

Creating a Calendar Table with the First date based on column value

Hello!    I am looking to create a calendar table that starts with the first date in the below table where the Print Drop Column = Yes, and the last date is the last date in the below table.    ...
  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi Ashoop2020 ,

    You can create a calculated table as below, please find the details in the attachment.

    Calendar = 
    VAR _mindate =
        CALCULATE ( MIN ( 'Table'[date] ), 'Table'[Print Drop] = "Yes" )
    VAR _maxdate =
        CALCULATE ( MAX ( 'Table'[date] ), 'Table'[Print Drop] = "Yes" )
    RETURN
        CALENDAR ( _mindate, _maxdate )

    Best Regards