Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Experts!
I have 5 flags for 5 fields that rate timeliness of service.
IF(A - Today()>0,1,0) AS ATimeFlag,
IF(B - Today()>0,1,0) AS BTimeFlag
IF(C - Today()>0,1,0) AS CTimeFlag
IF(D - Today()>0,1,0) AS DTimeFlag
IF(E - Today()>0,1,0) AS ETimeFlag
When I create a table it looks like this:
Type | % | Expression |
---|---|---|
A | 77% | AVG(ATimeFlag) |
B | 94% | AVG(BTimeFlag) |
C | 71% | AVG(CTimeFlag) |
D | 90% | AVG(DTimeFlag) |
E | 85% | AVG(ETimeFlag) |
Now what i need to do is Average all the percentages from the table above which should give me a result of 83%.
I tried:
AVG(AGGR({$<ATimeFlag,BTimeFlag,CTimeFlag,DTimeFlag,ETimeFlag={1}>}COUNT(distinct Id),service))
But didn't work.
PS. I still haven't fully wrapped my head around AGGR().
Any thoughts appreciated!
Hi,
Can you share your mock data. Thansks
Here is some mock data.
Hi,
Unable to open/read
Services - Copy.xlsx file
In feature no need to send full data. based on u r issue/requirement just send mock value with few rows should be enough. Thanks
Hi,
The
Services - Copy.xlsx is the same as Demo Data.QVD.
You really need these three:
Demodata.qvd
Staff- Copy.xlsx
Ethnicity- Copy.xlsx
The dates used to create the flags are in the Ethnicity file.
Use
Rangeavg (field, field, ....)
Or
Aggr(Rangeavg (field, field, ...),Type)