Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello!
I'm trying to write an expression and I'm thinking there must be an easier way to accomplish this than the way I'm trying to go about it right now. My data is similar to the table that I've pasted in below. I'm trying to get a sum of the average time taken for each process.
I can get the average in total like this: Sum([Time Counted Seconds]) / Sum(Transactions)
But that's for all of the Processes. What I really need is to do that for each process, and then add those together. I started doing it with set analysis to isolate each process, like this:
sum({<Process={'Process 1'}>}[Time Counted Seconds]) / sum({<Process={'Process 1'}>}Transactions)
And I thought I may do that for each process and add them all together, but my real table has more like 20 different processes, and I also think I'm running into division by zero errors, because if only one of the expressions doesn't have a result, I'm getting a null in my table...it seems like there must be a better way to do this.
System | Process | Time Counted Seconds | Transactions |
System A | Process 1 | 90 | 50 |
System A | Process 1 | 60 | 70 |
System A | Process 1 | 180 | 80 |
System A | Process 2 | 20 | 40 |
System A | Process 2 | 40 | 35 |
System A | Process 3 | 100 | 20 |
System A | Process 3 | 250 | 10 |
System A | Process 3 | 75 | 55 |
I'm grateful for any insights you may have. Thanks!
Hi,
you can try this:
=aggr(Sum([Time Counted Seconds]) / Sum(Transactions),Process)
if you want it summed, you would add sum to what youssef has
=sum(aggr(Sum([Time Counted Seconds]) / Sum(Transactions),Process))