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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Table with all dates from datefrom and dateto

Hi

I've a huge problem with scd2 table which contains DateFrom and DateTo colums. I want to connect this data with my calendar table, if someone will choose for example 2023-07-05, then user will see all data with datefrom and dateTo between this selected date. 

 

So, I want to create a bridge dates table. For example If my datefrom in my table (as a column) is 2023-06-01 (06 is a month) and dateTo (as a column) in my table is 2023-06-15 then I want to see a list of dates between this 2 dates. If another row in my table has a datefrom 2023-06-16 and DateTo 2023-06-30, then I want to see a list of dates between this 2 dates. 

 

How to calculate it in dax? Or maybe could you find another solution for handling datefrom and dateto in scd2 method?

 

 

1 REPLY 1
eliasayyy
Memorable Member
Memorable Member

hello here is an example

annonymous1999_0-1688548357443.png


add a new column called date from - to (optional)

 

Text.From([Date From]) & " - " & Text.From([Date To])

 

 

annonymous1999_1-1688548404475.png


next create a date column add custom column and use

 

{Number.From([Date From])..Number.From([Date To])}

 

annonymous1999_2-1688548464935.png


now press on the exapnd and choose expand to new rows


 

annonymous1999_3-1688548495286.png

annonymous1999_4-1688548508960.png


here is the result

annonymous1999_5-1688548551240.png

 

now create a relationship between date and your calendar date

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.