Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have following data sample:
ID Category Value Flag
x A 12 Chosen
x B 10 Cancelled
x C 5 Converted
I need to compare average value (on id level) with that of value of category with 'Chosen' Flag
The output I need is this:
ID Category Value Average Value
x A 12 9 (Average of 12,10 and 5)
I tried applying filter (Flag=Chosen), and ruled it out while calculating average. But, that does not seem to work:
avg({$<[Category]=,[Flag]=>}[Value])
This would ignore Category and Flag while calculating the average.
Try: avg({$<[Category]=,[Flag]=>} TOTAL [Value])
- Marcus
=avg(TOTAL {<Category, Flag>}Value)
Hi Marcus,
Thanks for the reply but isn't working.
This would give the overall average (same value for each row on id level).
If you are looking for different AVG based on ID use below
=avg(TOTAL <ID> {<Category, Flag>}Value)
Hi Manish,
By using the above query, filter (Category=Chosen) cannot be applied, please help. Will any query be required for Id (As dimension and value) as well?
Provide sample data along with the output you want in excel.