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

Announcements
Learn how to migrate to Qlik Cloud Analytics™: On-Demand Briefing!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Conditional expression result calculation

I have a pivot table that is set up like this:

amount 1          amount 2          %

1699.53               323.53          Column2/column1 or 19%

I need help with an expression that says if column 3 is 60%> or larger then i want 2% of column 2.  If it is 51-60% then i want 1.5%.  if it is 45-50% then i want 1%. 

Any suggestions?  I am befuzzled on this one.

Thanks,

Kristy

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Maybe like

=column(2) * if(column(2)/column(1) > 0.6, 0.02,

                         if(column(2)/column(1) > 0.51, 0.015,

                              if(column(2)/column(1) > 0.45, 0.01)))

edit, since you already got column(2)/column(1) as column(3):

=column(2) * if(column(3) > 0.6, 0.02,

                         if(column(3) > 0.51, 0.015,

                              if(column(3) > 0.45, 0.01)))

View solution in original post

1 Reply
swuehl
MVP
MVP

Maybe like

=column(2) * if(column(2)/column(1) > 0.6, 0.02,

                         if(column(2)/column(1) > 0.51, 0.015,

                              if(column(2)/column(1) > 0.45, 0.01)))

edit, since you already got column(2)/column(1) as column(3):

=column(2) * if(column(3) > 0.6, 0.02,

                         if(column(3) > 0.51, 0.015,

                              if(column(3) > 0.45, 0.01)))