Hi ,
I have a power automate to calculate how much time spent on each stage by the user.
I am using below expression to calculate the time in hours.
add(div(div(sub(ticks(utcNow()),ticks(items('Apply_to_each_2')?['contactedstartdate'])),600000000),60),items('Apply_to_each_2')?['contactedage'])
If the user only spent 10 minutes in one stage and moved on to next the expression is returning 0. How do I get the result in float/decimal points. I tried float() added to each result and it still not returning values in decimal points.
2 things:
1. Have you tried making the ticks a float before the sub calculations? (my first bet)
2. Have you tried doing the ticks and sub calculations in compose actions giving them the correct data types?
I tried with float ( sub()) , but not float(ticks). So I will try that.
In the compose action each function within the given expression is returning whole numbers even if I put float(div(<expression>), float(sub(<expression))
User | Count |
---|---|
102 | |
40 | |
29 | |
23 | |
16 |
User | Count |
---|---|
132 | |
52 | |
50 | |
36 | |
24 |