Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Data Pivoting, not getting the result as such

Hi All,

I have a data like below.

    

E.NoTypeSalaryMobile
1basic100.0034343
1DA50.0034353
1Spcl Allowance50.004254
1PF10.00244542
2basic150.00245234
2DA70.005335
2Spcl Allowance80.005234423
2PF15.003434

Want to Result like below, tried but didn't get the result. can you please help on this.

        

Type-List
basic
DA
Spcl Allowance
PF

        

                                                                               

Type-List E.NobasicDAPFTotal
basic 11005010160
DA 21507015235
Spcl Allowance
PF

                      

E.NobasicDATotal
110050150
215070220

Note: I don't want to see "Special Allowance" & "PF" Fields in my table, and want to have some Basic+DA as Total.

PFA for Exce-File Attachment.

Thanks,

Qk

4 Replies
Frank_Hartmann
Master II
Master II

create straight table with dimension:

E.No

and add expressions:

1. sum({<Type={'basic'}>}Salary)

2. sum({<Type={'DA'}>}Salary)

3. sum({<Type={'basic'}>}Salary)+sum({<Type={'DA'}>}Salary)

hope that helps!

vinieme12
Champion III
Champion III

Or you can still use a pivot table with below dimensions

1) E.No

2) =if(wildmatch(type,'basic','da')>0,type). << check Suppress when value is null

Expression

Sum(Salary)

In the presentation tab  check partial sum for E.no.

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
Anonymous
Not applicable
Author

Yes Frank Hartmann,

You are correct, and one more thing that

From List-Box

"If i select 'Basic,PF' it has to display Basic, PF as columns in table and has Total as Basic+PF,

"If i select 'Basic, PF, DA' it has to display Basic, PF, TA as Columns and has Total as Basic+PF+DA.

Can you please help on, how to achieve this.

Thanks,

Qk

sunny_talwar

I suggest using a pivot table instead of a straight table.

Dimensions

1) E.No

2) Type

Expressions

Sum({<Type *= {'basic', 'PF', 'DA'}>}Salary)

For Total select partial sum on the presentation tab...

Capture.PNG

When nothing is selected

Capture.PNG

When basic and DA is selected

Capture.PNG

Used the sample attached by franky_h79‌ and made modifications to provide this example.

Best,

Sunny