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 All
Is there a way to calculate the Number of Nights between two dates?
If so, please suggest a way to do it as a calculated column & through the measure.
Many thanks
Gaurav
Solved! Go to Solution.
Hi @gauravnarchal ,
I create some data:
Here are the steps you can follow:
1. Create calculated column.
day_number = DATEDIFF('Table'[Start date],'Table'[End date],DAY)
2. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @gauravnarchal ,
I create some data:
Here are the steps you can follow:
1. Create calculated column.
day_number = DATEDIFF('Table'[Start date],'Table'[End date],DAY)
2. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
"Days Between = DATESBETWEEN ( 'Table' [Dates], 'Table' [Start Date], 'Table [End Date] ) This will return a single number for the number of days between the two dates."
@gauravnarchal
What is the night definition you would use? I mean the time frame
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
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 |
---|---|
90 | |
88 | |
83 | |
64 | |
49 |
User | Count |
---|---|
126 | |
110 | |
87 | |
70 | |
66 |