Forum Discussion

laciodrom_80's avatar
laciodrom_80
Helper IV
10 years ago
Solved

Creating a new Table

Hi all,

 

I've got ConfigurationRangeDates table with theese three columns:

 

Id      StartDate                 EndDate

1     01/01/2016             31/03/2016

2     01/04/2016             31/07/2016

 

For every row of this table. I'd like to create a new table listing all dates included in the interval StartDate - End Date

 

I know CALENDAR function which could help me to my own, but I can't use it: 

 

NewTable = CALENDAR('ConfigurationRangeDates'[StartDate];'ConfigurationRangeDates'[EndDate])

 

I should specify an aggragation rule by Id but how?!?

 

Thanks a lot in advance for any hint!

2 Replies

  • v-sihou-msft's avatar
    v-sihou-msft
    Microsoft Employee

    laciodrom_80

     

    You can add a calculated column to assign different values based on date. The formula can be like:

     

    Column = IF('Table'[Date]>DATEVALUE("2016/3/31"),2,1)

    Please see my sample below:

     

     

    If you have many IDs, you can also use SWITCH() function

     

    Regards,

     

    Regards,