Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.
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 2023 Power BI update to learn about new features.
Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.