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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
brindlogcool
Creator III
Creator III

Pivot Table and straight table

Hi,

I am trying to create pivot table and straight table where as the table should display the data only when dates are in either of (R3,R6 or MTD) and Companycode=1.The same expression was working fine for R3 and MTD. When i added R6 it is not working

But still the pivot table is showing all the values which does not met the above criteria.The exrepssion i used to restrict the data is

=If(Status='Active' and  (Only({$<Companycode={$(#vCode)}>}_R6)=1 or Only({$<Companycode={$(#vCode)}>}_R3)=1

or Only({$<Companycode={$(#vCode)}>}_MTD)=1 ) and _Type=1,'Yes',

If(Status='Inactive' and  ( Only({$<companycode={$(#vCode)}>}_R6)=1 or Only({$<Comapnycode={$(#vCode)}>}_R3)=1

or Only({$<Companycode={$(#vCode)}>}_MTD)=1) and _Type=1,'No')))

Also i was trying to showing the count based on the below condition still it was working for R3 and MTD when i have added the R6 it is not working . I want to show 0 if  LEV is 1 for the selected company code and does not have any data for R3,R6 and MTD.  Below is the expression used

If(GetFieldSelections(_R3)=1,Sum({$<Companycode={$(#vCode)},LEV={1}>}CCNT),

If(GetFieldSelections(_MTD)=1,Sum({$<Companycode={$(#vCode)},LEV={1}>}CCNT),

If(GetFieldSelections(_R6)=1,Sum({$<Companycode={$(#vCode)},LEV={1}>}CCNT),0)

))

Labels (1)
3 Replies
Not applicable

I don´t know if you just copied and pasted youre expression or wrote it new in here, so it "might" make no sence what i´m writing here....

If(Status='Inactive' and  ( Only({$<companycode={$(#vCode)}>}_R6)=1 or

Only({$<Comapnycode={$(#vCode)}>}_R3)=1

or Only({$<Companycode={$(#vCode)}>}_MTD)=1) and _Type=1,'No')))

But there is one spelling mistake. (Bold and Underlined)--> Comapnycode

And QlikView is case sensitive in Set Analysis, you have to use (Also Bold and Underlined)--> Companycode not companycode

brindlogcool
Creator III
Creator III
Author

Thanks for your response. You are right i have not copy pasted . In the original expression there is no issue with the spelling.

We need to check the functionality

brindlogcool
Creator III
Creator III
Author

Thanks for your response. You are right i have not copy pasted . In the original expression there is no issue with the spelling.

We need to check the functionality