Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
In Qlik I have a table like this one:
ID, MTTR, Country:
0001, 5, Spain
0001, 5, France
0001, 5, Italy
0002, 3, Argentina
0002, 3, China
0003, 5, Spain
0003, 5, Japan
0003, 5, Australia
If I ask for the average MTTR, the result would be: 4.5
However, I only want to count the MTTR once, so the values would be:
ID, MTTR
0001, 5
0002, 3
0003, 5
And the AVG MTTR would be now: 4.33
I want to create a expression in a report to get this last AVG MTTR
Note: I tried AVG (DISTINCT MTTR) and it didnt work, as with this formula takes 5 only once, (5+3)/2, and I want (5+3+5)/3.
Thank you!
Hi @AdrianCT ,
Maybe this:
=avg( aggr(DISTINCT only(MTTR), ID, MTTR) )
I hope it can helps.
Best Regards
Hi @AdrianCT ,
Maybe this:
=avg( aggr(DISTINCT only(MTTR), ID, MTTR) )
I hope it can helps.
Best Regards
It worked. Thank you!