Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
I need to Modify Hours Column in My table.
Currently i have two Columns 1. Days 2. Hours as shown in the pic below.
Hours value at present is Total Hours but my requirement is to get Hours Value if and only if Days value is zero.
ex: if day value is 1, Hours value should be zero.
if day value is zero, then only hours value should populate by excluding the days.
thanks
santosh
Solved! Go to Solution.
Hi @SantoshKumar,
Here we can use MOD function to work on it.
Hours = IF(Table1[Days]=1,0,MOD(DATEDIFF(Table1[StartTime],Table1[EndTime],HOUR),24))
Regards,
Frank
Hi @SantoshKumar,
Here we can use MOD function to work on it.
Hours = IF(Table1[Days]=1,0,MOD(DATEDIFF(Table1[StartTime],Table1[EndTime],HOUR),24))
Regards,
Frank
Try:
Hours = IF([Days]>0,0,DATEDIFF...)
So, just plug in your formula for the FALSE condition.
Thanks @Greg_Deckler
i was able to get the details in sql when i providde my query as: DateDiff(Hour,StartTrgTime,endTrgTime)%24
when it comes to PB_query - i have below option
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
97 | |
80 | |
69 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |