Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to add extra calculated rows?

hi, i have a 2-D (State and Group) pivot table showing count, as below:

State     Group     g1     g2     g3     Total

Total          100     200     300     600

s1          90     190     285     565

s2          10     10     15     35

now i want to add one row at bottom to calculate percentage of State s2 out of Total per Group, like below:

State     Group     g1     g2     g3     Total

Total          100     200     300     600

s1          90     190     285     565

s2          10     10     15     35

s2 %          10%     5%     5%     

is this possible and can anyone tell how to do it?

or any other alternatives?

thanks,

little

16 Replies
Anonymous
Not applicable
Author

hi Litlle , as per my understanding find the solution with the attached. Let me know if that helps....

Not applicable
Author

vinay_bangari wrote:

hi Litlle , as per my understanding find the solution with the attached. Let me know if that helps....

      Hi Little, add vinay's point. Perhaps it would meet ur requirement if turning to use pivot table and switch row and column.

Not applicable
Author

vinay_bangari wrote:

hi Litlle , as per my understanding find the solution with the attached. Let me know if that helps....

      Hi Little, add vinay's point. Perhaps it would meet ur requirement if turning to use pivot table and switch row and column.

Not applicable
Author

Thank you Mike and Vinay, your response are very helpful.

But what if my data input is not cross table but flat like below?

Basically, the problem is the cross view generated out of below data won't have fixed dimension field names, as they are coming from distinct of data.

IdentifierGroupState
2g1s1
3g1s2
4g2s1
5g2s2
6g1s1
7g1s2
8g2s1
9g2s2
10g1s1
11g1s1
Anonymous
Not applicable
Author

Hi,

You could add a row into your State table with 'ZZZ' (not very pretty I know*) to appear in your table as the last row.

You could then change the calculation for your columns to say:

if(Bottom(TOTAL count(YourCounterField)),Num(count({$<State={'s2'}>}g1)/aggr(count(g1),'Group'),'##%'))    // %age of State/Group combo out of Total per Group

For this new row to appear you'll need to ensure you've not ticked Suppress Zero-Values or Suppress Missing in the Presentation tab.

Regards,

Jonathan

*Alternatively could ensure States are loaded in correct alphabetical order, and then add a new row called 'Percentage' later and then sort by 'Load Order'

Not applicable
Author

thank you. wrt adding the row, can we configure it from data loading process (qlikview side)? As we intend to provide data thru a web service, and adding dummy row there might not be feasible.

the whole idea is: does QlikView provide some simple Excel-like funtions, such as this one - adding a row computing from other rows?

Anonymous
Not applicable
Author

Hi,

Not sure I understand the scanerio exactly, but after you've done all your loads from web services etc you could concatenate a row onto the internal QV table.

Jonathan

jagan
Luminary Alumni
Luminary Alumni

Hi,

Hope attached file helps you, check that is what you required.

Regards,

Jagan.

sujeetsingh
Master III
Master III

Hey plz explain the senerio.