Not able to use 2 level of aggregations with same set of grouping columns

Hi All,

Is there way to achieve using 2 LAC functionality with other QS functions . I have a usecase to do sum(avg(col,grp by 1,2,3),grp by 1,2,3)

code :
${Currency} = “EUR”,{eur_rate},
${Currency} = “USD”,{usd_rate},
${Currency} = “LocalMP”,1
${BpsBY} = “PCcogs”,{p_cogs_cy},
${BpsBY} = “PRev”,{p_rev_cy},
${BpsBY} = “NetRev”,{net_rev_cy}

It errored out
Visual agg functions can’t be used operands of as Level Aware Calculation (LAC) agg functions


Hi @PavanKanna

try to create the nested aggregation as a separate calculated field at the DATA SET PREP level, not in the analysis.

Hope it helps,

Thanks for responding i’m getting weird issue at dataset level not able to


Function AVG should have 1 argument(s) instead of 2 argument(s).


avgOver( sum({p_rev_cy}), [{period}], PRE-AGG)

calculation level

(Optional) Specifies the calculation level to use:

    PRE_FILTER – Prefilter calculations are computed before the dataset filters.

    PRE_AGG – Preaggregate calculations are computed before applying aggregations and top and bottom N filters to the visuals.

    POST_AGG_FILTER – (Default) Table calculations are computed when the visuals display.
1 Like