Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Generate a data table based on other table

hi, i have a table A with a date field 'Orderdate' in it. And i want to create another date table B with only dates between Min('Table A'[Orderdate])  to Max('table A'[Orderdate]).   like this i h...
  • Anonymous's avatar
    Anonymous
    7 years ago

    Anonymous ,


    According to your description, my understanding is that you want to create a calendar table with continuous data between Min('Table A'[Orderdate]) to Max('table A'[Orderdate]).

    In this scenario, we can create a calculated table using the function CALENDAR, this function returns a table with a single column named “Date” that contains a contiguous set of dates, please refer to the following query:

    Calender = CALENDAR(MIN('table A'[Orderdate]),MAX('table A'[Orderdate]))

     

    Calculated tables will be re-calculated if any of the tables it pulls data from are refreshed or updated in any way.

    Regards,
    Lydia