Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Experts,
How can i write this in set expression,Here my dimension is Product
sum(if(Product='Shoes',if(sales>1500,sales),sales))
Not working
Hi Bro,
Product | Customer | sales |
Laptop | Madhu | 50000 |
Laptop | Ravi | 70000 |
Laptop | Raja | 1000000 |
Shoes | Madhu | 1500 |
Shoes | Raja | 4200 |
Shoes | Krishna | 45000 |
T.V | Madhu | 25000 |
T.V | Ravi | 27000 |
T.V | Raja | 32000 |
W.M | Raja | 1500 |
W.M | Madhu | 8000 |
W.M | Ravi | 15000 |
Here i want to eliminate sales when product sheos sales <=1500
Sum({<Product={'Shoes'},sales={'> 1500'}>} sales)+Sum({<Product-={'Shoes'}>} sales)
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?
SUM({<Product={'Shoes'},Sales={'>1500'}>} Sales)+SUM({<Product={'*'}-{'Shoes'}>} Sales)
then this
sum({<Product-={'Shoes'}>+<Product={"=SUM({<Product = {'Shoes'}>}sales)>1500"} >}sales)
have a deeper look at sunnys solution.
for me its working with the data you provided.