Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello All,
TicketId | Type | ProductId |
---|---|---|
1 | Accepted Lead | 2 |
2 | Accepted Lead | 3 |
3 | Accepted Lead | 5 |
4 | Rejected Lead | 5 |
5 | Instructed Lead | 2 |
6 | Instructed Lead | 5 |
I have the following Set Analaysis which is counting where TicketId is Type 'Accepted Lead' OR 'Instructed Lead':
Count({$<Type={'Accepted Lead'}>+<Type={'Instructed Lead'}>}TicketId)
I need to include another condition, something like:
Count({$<Type={'Accepted Lead'}>+<(Type={'Instructed Lead'},ProductId -= {'5'})>}TicketId)
But whatever I try doesnt seem to count anything!
Essentially, I need to count the TicketId's where Type = 'Accepted Lead' OR ( 'Instructed Lead' AND ProductId<> 5)
Any help would be greatly appreciated.
Thanks
i tried expression same as urs n getting output 4, can u plz check is it right or not?
Try removing the paranthesis () in your second set modifier:
=Count({$<Type={'Accepted Lead'}>+<Type={'Instructed Lead'},ProductId -= {'2'}>}TicketId)
The expression below, I would solve like the Qlikview expression further below
Essentially, I need to count the TicketId's where Type = 'Accepted Lead' OR ( 'Instructed Lead' AND ProductId<> 5)
=Count(
{$
<Type={'Accepted Lead'}>
+
<Type={'Instructed Lead'},
ProductId -={5}
>
}TicketId)
(I updated it a bit, since I realised that ProductId should be excluded only when it is an instructed lead).
try something like below..
Count({$<Type={"Accepted Lead","Instructed Lead"},ProductId = ProductId - {"5"})>}TicketId)
hope that helps..
Try this One:
=Count({$<Type={'Accepted Lead'}>+<Type={'Instructed Lead'},ProductId-={'5'}>}TicketId)
Use exclude function,it will help
=Count({<Type={'Accepted Lead'}> + <Type={'Instructed Lead'},ProductId =e({<ProductId={5}>})>}TicketId).