Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
I have got two date/time fields in the table that I am using in a nested if statement that calculates the variance between them. I want power bi to ignore the hours completely and calculate the variance based on days only
Example:
What I get : (01/01/2020 00:00:00) -( 01/01/2020 17:00:00) = 1
What I would like to see (01/01/2020 00:00:00) -( 01/01/2020 17:00:00) = 0 ( because the day is the same)
Formula extract:
Solved! Go to Solution.
Use INT([datetime])
This will drop the decimal portion of your date time column.
Use INT([datetime])
This will drop the decimal portion of your date time column.
@Greg_Deckler Thank you very much, one last question is there a way to apply INT per formula rather than per each date column ( as my formula has quite a few lines) ?
so that instead of INT(date1)-INT(date2)
something like INT([date1]-[date2]) - this didnt work but wondering if there is a way to do this ?
Thank you
User | Count |
---|---|
54 | |
23 | |
19 | |
18 | |
17 |
User | Count |
---|---|
91 | |
87 | |
47 | |
30 | |
22 |