Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
Hello Everyone,
I am using duration.days to calculate the duration between two dates. But the result is sometimes right and sometimes wrong.
For example between 28/04/2020 and 04/05/2020 it should returns 7, it returns 6
And between 05/05/2020 and 06/05/2020 it returns the correct result which is 1.
Still showing 6 instead of 7
because of 28/04/2020 is excluding it is not including.
I don't think so, because it gives correct results for other dates, like 04/05/2020 and 07/05/2020. it returns 3
it gives correct results for other dates, like 04/05/2020 and 07/05/2020. it returns 3 , YES because 04/05/2020 is excluding and 07/05/2020 is including i.e (05/05/2020,06/05/2020,07/05/2020) , you should count other dates day.
How can i correct this then ?
Should i add 1 to the result?
No @Anonymous ,because if you add 1 so in this scenario05/05/2020 and 06/05/2020 it returns the correct result which is 1 answer will be wrong.
Then should i just leave it like this?
Go To >> Power Query >> Select first date then Select subtract date column >> Add column tab >> from Date & time >> Date drop down >> click subtract day >> you got your answer correct.
>>first date is exluding it is not including.
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
94 | |
92 | |
83 | |
71 | |
49 |
User | Count |
---|---|
143 | |
120 | |
110 | |
59 | |
57 |