Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am attempting to create an expression using RangeSum command and aggr.
I am trying to create a running % of sales by a line grouping.
The row is by Product with the Product Grouped in a higher level grouping call prodcat
In other words, I want to see the % of sales by product X the prodcat
When I enter the following, all works well.
=(Rangesum(Above(Sum(line_total),0,RowNo(TOTAL))))/Sum(TOTAL line_total)
When I attempt to aggr by prodcat, I get sporadic results, only one row in the grouping returns a %.
=(Rangesum(Above(Sum(line_total),0,RowNo(TOTAL))))/aggr(Sum(TOTAL line_total),prodcat)
I am new to Qlikview so be gentle??? LOL
Your approach missed an outer aggregation - in this way it's rather a calculated dimension. Therefore try it in this way:
avg(aggr(Sum(TOTAL line_total),prodcat))
or maybe with
aggr(NODISTINCT Sum(TOTAL line_total),prodcat)
- Marcus
Your approach missed an outer aggregation - in this way it's rather a calculated dimension. Therefore try it in this way:
avg(aggr(Sum(TOTAL line_total),prodcat))
or maybe with
aggr(NODISTINCT Sum(TOTAL line_total),prodcat)
- Marcus
Marcus,
Thank you so much. Changing divisor to aggr(NODISTINCT Sum(TOTAL line_total),prodcat) worked perfectly.
Really appreciate the advice!
Thanks,
Randy