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: 
priyav24
Creator II
Creator II

Issue with If -Statement??

Hello Everybody,

                         I have a requirement only account type  1 and 2 should be shown,Rest should not be shown in a pivot table..

I have tryed using the calculated dimension

"=if(AccountTypeCode=1 ,

if(AccountTypeCode=2 ,AccountTypeName))"   This is not working,

So i have used an alternative calculated Dimension

"if(AccountTypeCode<>3 ,

if(AccountTypeCode<>4 ,AccountTypeName))"

Since we have only four account type this alternative method works ,If we had more account type then it will be very diffcult, I have attached qlikview file for the reference...

Is there any solution ??

Also i want to know how to customize style in pivot table.

Thanks in Advance,

Priya

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Don't use nested if() statement here, use something like

=if(AccountTypeCode=1 or AccountTypeCode=2, AccountTypeName)

View solution in original post

7 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     Try this.

     If(Match(AccountTypeCode,1,2),AccountTypeName)

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
swuehl
MVP
MVP

Don't use nested if() statement here, use something like

=if(AccountTypeCode=1 or AccountTypeCode=2, AccountTypeName)

er_mohit
Master II
Master II

try this

=aggr(only({$<AccountTypeCode={'1','2'}>}AccountTypeName),AccountTypeCode)

or

=aggr(only({$<AccountTypeCode={1,2}>}AccountTypeName),AccountTypeCode)

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Another way is you use the set analysis.

Sum({<AccountTypeCode = {1,2}>}[Sum(VoucherAmount)])

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
priyav24
Creator II
Creator II
Author

Thank you Kaushik..

Also I wanted to know how to customize the style in pivot table..style.png

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     You need to enable the setting under

     User Preference -> Design -> Allow Show Design Menu Items.

     Once you have enabled this.

     Right click on the chart you will find an option called custom format cell.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
priyav24
Creator II
Creator II
Author

Thanks kaushik