Forum Discussion
jshutters
7 years agoResolver I
Calculate difference between two dates power query
How do I calculate the difference between two dates in Power Query M code (not DAX)? I'm looking for the number of days.
- 7 years ago
Hi jshutters
you need to use the duration functions: https://docs.microsoft.com/en-us/powerquery-m/duration-days
=each Duration.Days([Date1] - [Date2])
Anonymous
2 years agoNot applicable
Source Data
Replacing null by 0 in sctotal and invvalue columns
Added new SCDate Column
Added new INVDate column
Added list of days or calendar column
Added final value per day column
Expanded the calendar and loaded it.
Use the calendar in slicer and final value column in card.
If your expectation is met the pls accept the solution.