Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
laciodrom_80
Helper IV
Helper IV

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!

Luca
1 ACCEPTED SOLUTION
KHorseman
Community Champion
Community Champion

@laciodrom_80 you will need a separate date table with a continuous range of dates covering the entire range of dates you want to cover. Then you can use the solution given when I had essentially the same question as you. Except where I'm using a week column you will use the date column.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

2 REPLIES 2
v-sihou-msft
Employee
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:

 

Capture03.PNG

 

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

 

Regards,

 

Regards,

KHorseman
Community Champion
Community Champion

@laciodrom_80 you will need a separate date table with a continuous range of dates covering the entire range of dates you want to cover. Then you can use the solution given when I had essentially the same question as you. Except where I'm using a week column you will use the date column.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.