Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
The P() and E() functions seem great except you have to use them in an aggregation (or measure). But I'm doing a lot of complex junk, so it'd be nice to see exactly WHAT is being summed/counted/etc. So if I can see it as a dimension, that'd be swell.
For the example in the help section:
sum({<Customer=P({<Product1={'Shoe'}>}Customer)>}Sales)
I thought about the equivalent formula as
=sum(if(Customer = if(Product1='Shoe',Customer),Sales))
So to see what's going on, I can do a filter pane with just
if(customer=(if(product='shoes'),customer),sales)
Alas, my version of this isn't working.
What's the equivalent of the P() in dimension-land? Is it possible? And if not possible, why?
Thanks, y'all!
What exactly are you doing? Please state your requirement with data or app?
May be this
=Sum(Aggr(If(SubStringCount(Concat(TOTAL <Customer> '|' &Product & '|'), '|Shoe|'), Sales), Customer, Product))
Here's the data set and a bit of the work I've been doing. Thanks so much for taking a peek.
Here you go
Sum(Aggr(If(SubStringCount(Concat(DISTINCT '|' &Product1 & '|'), '|Shoe|') = 1, Sum(Sales)), Customer))
Hi,
sum({<Customer=P({<Product1={'Shoe'}>}Customer)>}Sales) EQUIVALENT TO
Sum of Sales of Possible Customers when Product1='Shoe'.
if(customer=(if(product='shoes'),customer),sales) EQUIVALENT TO
you are saying Qlikview that only when Product1='shoes',then calculate Sum(Sales) of customers when product1='Shoes'
and hence both expressions are completely different and return different values (unless it is accidental or co-incidence)
Hope that makes Sense.