Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Talk to Experts Tuesday, Live Q&A, September 22: Moving from QlikView to Qlik Sense. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Specialist
Specialist

Set Expression

Hi Experts,

How can i write this in set expression,Here my dimension is Product

sum(if(Product='Shoes',if(sales>1500,sales),sales))

17 Replies
Highlighted
Specialist
Specialist

Not working

Highlighted
Specialist
Specialist

Hi Bro,

  

ProductCustomer                   sales
LaptopMadhu50000
LaptopRavi70000
LaptopRaja1000000
ShoesMadhu1500
ShoesRaja4200
ShoesKrishna45000
T.VMadhu25000
T.VRavi27000
T.VRaja32000
W.MRaja1500
W.MMadhu8000
W.MRavi15000
Highlighted
Specialist
Specialist

Here i want to eliminate sales when product sheos  sales <=1500

Highlighted
Master III
Master III

Sum({<Product={'Shoes'},sales={'> 1500'}>} sales)+Sum({<Product-={'Shoes'}>} sales)

Highlighted
Partner
Partner

What are you trying to achieve mahesh? Walk us through it in words.

For example your first one I would explain as this:

Take all sales and take all sales for shoes that for each transaction that are above 1500. (So I would say a logical fault here, maybe you want to discard all sales that are below 1500 for shoes?)

sum({<Product={'Shoes'}, sales={'> 1500'}>} sales) + sum({<Product-={'Shoes'}>}sales)


Is this what you are after?


Highlighted
Contributor III
Contributor III

SUM({<Product={'Shoes'},Sales={'>1500'}>} Sales)+SUM({<Product={'*'}-{'Shoes'}>} Sales)

Highlighted
Champion II
Champion II

then this

sum({<Product-={'Shoes'}>+<Product={"=SUM({<Product = {'Shoes'}>}sales)>1500"} >}sales)

Highlighted
Master II
Master II

have a deeper look at sunnys solution.

for me its working with the data you provided.