Forum Discussion
nikhil893
9 years agoNew Member
How to dynamically calculate the difference between two dates selected from a slicer?
We want to calculate the difference in seconds between the two dates( start and end) selected from a slicer. As we are very new to this could anyone please help us out?
Thank you,
Nikhil Pranav
Hi nikhil893,
PorkChop's DAX expression works fine.
Measure = DATEDIFF(MIN(Sales[Date]),MAX(Sales[Date]),DAY)&" Days"
Regards,
Charlie Liao
7 Replies
- PorkChopAdvocate I
Hey dude.
If you are doing this in dax it's super simple.
=DATEDIFF([Startdate],[EndDate],second)
- v-caliao-msftMicrosoft Employee
Hi nikhil893,
PorkChop's DAX expression works fine.
Measure = DATEDIFF(MIN(Sales[Date]),MAX(Sales[Date]),DAY)&" Days"
Regards,
Charlie Liao