Forum Discussion
ffunky
7 years agoHelper I
Extrapolate days and fill down
Hi folks, I've tried about 20 different methods to get this to work, and I can't seem to figure it out! I'm fairly new at PBI, so that's probably part of the issue... ;) I have a table in SQL with historical price changes for items and stores - but it only stores changes. I'm trying to build it out to a full calendar so I can chart it. I can do this in SQL with a between function, but I want PBI to do the calculation, so I'm not pushing as much data to it. Table structure: StoreNbr, UPC, Start_Dt, End_Dt, Cost, Retail I have a calendar table I can bump it against, but can't seem to get my result to show *all dates* with cost and retail filled in. Thank you -jason
To be general, you may create a calendar table using DAX below:
Calendar = CALENDAR ( MIN ( Table[Start Date] ), MAX ( Table[End Date] ) )
Then merge the original table with the calendar table based on [Start Date] or [End Date] to fill the date.
Regards,
Jimmy Tao
1 Reply
- v-yuta-msftCommunity Support
To be general, you may create a calendar table using DAX below:
Calendar = CALENDAR ( MIN ( Table[Start Date] ), MAX ( Table[End Date] ) )
Then merge the original table with the calendar table based on [Start Date] or [End Date] to fill the date.
Regards,
Jimmy Tao