Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello
I am getting the error for the following Expression
Can you guys please help me to understand the reasons?
I Need the no of Customers (KP.EMM-ID)
where the Booking Type = 'reward order' and the max no of orders <=3
Many thanks
Sonja
I think it's what you want (in orange).
You can't have the expression like this:
$(dvRewOrders) <= {'3'}
Still is a valid syntax although It don't know if it will work for you:
aUniqueKey = {"=$(dvRewOrders)<=3"}
but it also depends on the content of the variable dvRewOrders
This Expression OK but the result '0'
=Count(Aggr(only( {<[C005.Booking Type.TEXT] = {'reward order'} count([C005.Booking ID]<='3')), [KP.EMM-ID]))
I Need the no of Customers (KP.EMM-ID)
where:
the Booking Type = 'reward order' and the max no of orders <=3
any ideas for my
thanks
Would you be able to share a sample to look at your datamodel?
Attached you will find a sample with data
Many thanks
maybe
=Count( {$ <[Customer-ID]={"=count({$ <[Booking Type]={'Reward Order 1'}>} [Booking ID])<=3"}>} distinct [Customer-ID])
If you are wondering what it means and how it works:
This is an Advanced Search criteria within the Set Analysis condition. Advanced Search (enclosed in double quotes and begins with the equals sign "=") allows evaluating ANY logical conditions in the context of the field. In this formula, the number of reward orders is evaluated for each Customer, and the result is compared to 3.
Come and learn advanced Set Analysis from my lecture at the Masters Summit for Qlik!
cheers,
Oleg Troyansky
I think it's what you want (in orange).
First you have to create a variable to store no. of orders and after that You have to write like this :
count({$<[C005.Booking Type.TEXT] = {'reward order'},Orders={'<=$(dvRewOrders)'}>}[KP.EMM-ID])
It will run properly.
Thanks,
Brijesh
$(dvRewOrders) = { < '3'}
Thanks & Regards
Rajesh Kumar