The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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 |
---|---|
17 | |
8 | |
7 | |
6 | |
6 |
User | Count |
---|---|
26 | |
13 | |
12 | |
9 | |
8 |