Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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?
hello here is an example
add a new column called date from - to (optional)
Text.From([Date From]) & " - " & Text.From([Date To])
next create a date column add custom column and use
{Number.From([Date From])..Number.From([Date To])}
now press on the exapnd and choose expand to new rows
here is the result
now create a relationship between date and your calendar date
User | Count |
---|---|
22 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
26 | |
13 | |
11 | |
9 | |
6 |