Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Formula in Qlikview

I am trying to display a table but only select distinct rows from one of the columns (an IN formula) but am struggling, can you help?

1 Solution

Accepted Solutions
johnw
Champion III
Champion III

So, for instance you want the sum of sales for customers, but ONLY for customers Bob, Carla and Dan?  You could do this:

dimension  = if(match(Customer,'Bob','Carla','Dan'),Customer)
expression = sum(Sales)

Or this:

dimension  = Customer
expression = sum({<Customer={'Bob','Carla','Dan'}>} Sales)

I suspect the second approach would be faster to execute.

View solution in original post

5 Replies
johnw
Champion III
Champion III

So, for instance you want the sum of sales for customers, but ONLY for customers Bob, Carla and Dan?  You could do this:

dimension  = if(match(Customer,'Bob','Carla','Dan'),Customer)
expression = sum(Sales)

Or this:

dimension  = Customer
expression = sum({<Customer={'Bob','Carla','Dan'}>} Sales)

I suspect the second approach would be faster to execute.

Not applicable
Author

Thanks for the help John!

Not applicable
Author

Sorry - I must sound like a fool here!

I have 3 fields ' Current Year'  'Previous Year' and Description.

I want to show a table with only 3 values from the description field and the other 2 fields associated - I have tried your suggestion but it doesnt seem to work.

Andy

johnw
Champion III
Champion III

I'm sorry, but I don't really follow.  Can you show some example data, and then what you want the chart itself to look like?

Not applicable
Author

I answered my own question John, thanks for the help!