Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request 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
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!