Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
43918084
Creator II
Creator II

Calculate percentage of subtotal and sort by mulitple dimension

I have a Period over Period table with Customer id [ip Lcl Ref Cde Ith] and account code [GRCA].   

Other attributes I have also created to indicate change of customer grading within the table.

I have set up a Pivot table.  But I do not know how to create a formula for % by GRCA and sort by Top absolute % contribution.  Hope I could get some guidance on below:-

 

In the below by GRCA table, I can see the variance of t1-t0 appears for most GRCA

Capture.PNG

In the below By customer By GRCA and other attribute table under % TotalGRCA, I want to show the

% of the customer contribution to Total GRCA.

I have tried using

(aggr(rangesum(t1_amt_HKD000),[Ip Lcl Ref Cde Ith])-aggr(rangesum(t0_amt_HKD000),[Ip Lcl Ref Cde Ith]))/aggr(rangesum(t1_amt_HKD000)-rangesum(t0_amt_HKD000),GRCA)

But the result is mostly null or incorrect.  

Capture.PNG

From the above, I would also need guidance on how to present the result in % format and sort the result of each 6 attributes in the 2nd table by top [% TotalGRCA]

Many thanks in advance.  I apologise for so many questions as I have tried looking up everywhere the whole day and still do not get it resolved.

Many thanks.

0 Replies