Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers!
Enter the sweepstakes now!Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.
Hi,
I have two measures with calculated date values.
Measure 1:
How can i create another measure to find number of days between them?
Solved! Go to Solution.
Hey @Sdhn420 ,
returning the number of days between two dates is quite straight forward, as dates are stored as decimals internally. For this reason the below sample returns 15, you might have to consider adding 1 if you want to count the start date as well.
Days between dates =
var measure1 = DATE( 2021 , 6 , 2 )
var measure2 = DATE( 2021 , 6 , 17 )
return
INT( measure2 - measure1 )
Hopefully, this provides what you are looking for.
Regards,
Tom
Thank you so much! This is exactly what I was looking for!
Hey @Sdhn420 ,
returning the number of days between two dates is quite straight forward, as dates are stored as decimals internally. For this reason the below sample returns 15, you might have to consider adding 1 if you want to count the start date as well.
Days between dates =
var measure1 = DATE( 2021 , 6 , 2 )
var measure2 = DATE( 2021 , 6 , 17 )
return
INT( measure2 - measure1 )
Hopefully, this provides what you are looking for.
Regards,
Tom
Thank you so much! This is exactly what I was looking for!
Check out the April 2025 Power BI update to learn about new features.
Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
User | Count |
---|---|
72 | |
67 | |
67 | |
42 | |
42 |
User | Count |
---|---|
46 | |
38 | |
28 | |
26 | |
25 |