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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Is it possible?

Hi All,

Is it possible in the pivot table to change the values from 1 to 'Yes' and 0 to 'No'  in Columns MS1,MS2,MS3,MS4. and total column should get affected.

Please help.

filter.png

Thanks,

Selva

1 Solution

Accepted Solutions
Not applicable
Author

5 Replies
Anonymous
Not applicable
Author

Hi

Have you tried using the dual() function in the load script?  Maybe something like :

     if ( MS1 = 1 , dual('Yes', 1), dual('No', 0) ) as [MS1Dual] ,

If you really want to you could use this expression in the pivot table, but personally I would always do it in the load script.

Best Regards,     Bill

Not applicable
Author

Hi Selva,

To avoid any change in total :

if(MS1=1,Dual('Yes',1),if(MS1=0,Dual('No',0),MS1))

Same goes for all the four expressions

To change your total :

if(MS1=1,'Yes',if(MS1=0,'No',MS1))

Not applicable
Author

Hi,

My script is as below

Crosstable(Questions, Value,4)

SQL Select MYSTERY_SHOPPER, DEALER, COUNTRY, WAVE, Q1, Q2, Q3, Q4, Q5,Q6,Q7A,Q7B,Q8,Q9,Q10,Q11,Q12,Q13 from tablex

In Pivot table , below are the dimensions

Questionsow

MYSTERY_SHOPPER

In Pivot table , below is the expression.

if(SecondaryDimensionality()=1, sum(Alt(Value,0)), num(sum (Alt(Value,0))/count (MYSTERY_SHOPPER ),'0%') )

How  can i use the Dual function to display 1 as 'Yes' and o acs 'No'.

Appreciate if you could help me on this.

Anonymous
Not applicable
Author

if ( SecondaryDimensionality()=1 ,

  if ( sum(Alt(Value,0)) = 1 ,

       Dual('Yes',1) ,

       if ( sum(Alt(Value,0)) = 0 ,

            Dual('No',0) ,

            sum(Alt(Value,0)

       )

  num(sum (Alt(Value,0))/count (MYSTERY_SHOPPER ),'0%')

)

Not applicable
Author

Thanks a lot bill.markham