Forum Discussion
Convert start and end dates to continuous range
- 4 years ago
Hi Syndicate_Admin ,
According to your description, I create a sample.
Here's my solution.
1.Create a Date table, don't make relationship between the two tables.
Date = CALENDARAUTO()2.Create two measures.
Consumption Measure = MAXX ( FILTER ( 'Table', MAX ( 'Date'[Date] ) >= 'Table'[Start] && MAX ( 'Date'[Date] ) <= 'Table'[End] ), 'Table'[Consumption] )Importe Measure = MAXX ( FILTER ( 'Table', MAX ( 'Date'[Date] ) >= 'Table'[Start] && MAX ( 'Date'[Date] ) <= 'Table'[End] ), 'Table'[Importe] )Put Date from Date table in X-axis, Concept in Legend and measure in Y-axis, get the result.
I attach my sample below for your reference.
Best Regards,
Community Support Team _ kalyjIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Syndicate_Admin ,
Power query can create date rows from your start and end date columns but how are those numbers supposed to be distributed? Are they going to be divided by the number of days from start to end so you'll get the daily amount?
Yes, basically it is what I intend, to obtain a daily ratio, which can then be grouped to higher levels (monthly, annual), because it is impossible to know if one day there was more or less consumption. I simply know that for a certain period (the days between Start and End) there was X consumption that meant Y expense.