Discussion Board for collaboration on QlikView Scripting.
i have a stacked chart and need to calculate the % of total.. so that overall it will be 100%. There are two dimensions date and cust type
X axis has date.
the numerator works fine and gives me the number. But the complete formula is not working.
Sum(if(period_id='CY' , customer_cnt))/ SUM(TOTAL IF(period_id='CY', aggr(sum (customer_cnt),[Local Date])))
Try this one
Sum(if(period_id='CY' , customer_cnt))/Aggr(nodistinct Sum(if(period_id='CY' , customer_cnt)),[Local Date])
View solution in original post
thanks for looking into it. I tried your logic
the denominator actually gives the overall total of customer_cnt instead of the total for that date on x axis. Due to which %'es are not right for the cust_type split. Ideally it should be total of 100% based on the cust_type split
Attaching the screenshot.
thank you. This formula worked.