Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Pivot Two Dates in each day date

This is my data table, I want to convert the table from start and finish date, into vertical dates. I am not sure if the technical term to do this is called Pivoting. Example: Line 126, Ta...
  • ryan_mayu's avatar
    5 years ago

    Anonymous 

    you can create a date table

    Date = CALENDAR(min('Table'[Start]),max('Table'[End]))

    then you can use DAX to create a new table

    Table 2 = GENERATE('Table',FILTER('Date','Table'[End]>='Date'[Date]&&'Table'[Start]<='Date'[Date]))

    I haven't tried this before, so I did test for blank for start date and end date.

    It looks like test1 does not show up in the Table2 and test 2's start date will be the minimum date of date table.

    please see the attachment