Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have a requirement where I need to use OR condition in set analysis.
This is my exact requirement what i am looking for.
[GIDFLAG={'0'} and BS ={'A','B'} and region={'US'} and [Channel ={'A','B','C'} or ( Channel ={'D'} and custno={'1','2,'3'} )] and
vDeli={'LCD'} and PSI='S11]
Every time I have been failing in underlined condition.
how we can use above condition in set analysis function,Any suggestions should appreciates.
Thanks
Hi
If I understand you right you want a set expression to filter as follows:
GIDFLA={'0'} and BS={'A','B'} and Region={'US'} and Channel={'A','B','C'}
OR
Channel={'D'} and custno={'1','2,'3'}
Then use:
{<GIDFLA={'0'}, BS={'A','B'}, Region={'US'}, Channel={'A','B','C'}> + <Channel={'D'}, custno={'1','2,'3'}>}
HTH
Jonathan
Even me also have same requirement, in set analysis we can get AND condition but OR condition I don't think so.
Hi
If I understand you right you want a set expression to filter as follows:
GIDFLA={'0'} and BS={'A','B'} and Region={'US'} and Channel={'A','B','C'}
OR
Channel={'D'} and custno={'1','2,'3'}
Then use:
{<GIDFLA={'0'}, BS={'A','B'}, Region={'US'}, Channel={'A','B','C'}> + <Channel={'D'}, custno={'1','2,'3'}>}
HTH
Jonathan
If you want the first 3 terms to apply to the whole filter:
GIDFLA={'0'} and BS={'A','B'} and Region={'US'} and Channel={'A','B','C'}
OR
GIDFLA={'0'} and BS={'A','B'} and Region={'US'} and Channel={'D'} and custno={'1','2,'3'}
Then:
{<GIDFLA={'0'}, BS={'A','B'}, Region={'US'}, Channel={'A','B','C'}> + <GIDFLA={'0'}, BS={'A','B'}, Region={'US'}, Channel={'D'}, custno={'1','2,'3'}>}
Jonathan
Looking for OR condition in set analysis
try like this swathiRaj,
sum({<GIDFLAG = {'0'},BS={'A','B'},region={'US'},channel={'A','B','C'},custno={'1','2','3'},vDeli={'LCD'},PSI={'s11'}>
+<GIDFLAG = {'0'},BS={'A','B'},regions={'US'},channel={'D'},custnp={'1','2','3'},vDeli={'LCD'},PSI={'s11'}>} sales)
HI Swathi,
AS Jonathan mentioned above in set analysis if you want to use AND condition then write expression seperated by Comma(,)
eg:
sum({<GIDFLA={'0'}, BS={'A','B'}, Region={'US'}, Channel={'A','B','C'}>}sales)
For OR condition use(+) sign in set analysis:
sum({<GIDFLA={'0'}, BS={'A','B'}, Region={'US'}, Channel={'A','B','C'}> + <GIDFLA={'0'}, BS={'A','B'}, Region={'US'}, Channel={'D'}, custno={'1','2,'3'}>}sales)
Regards
KC
Did you try what I suggested?
Thanks for your replies.But In this below condition custno is depenpds on channel D only ,not on whole set.
GIDFLA={'0'} and BS={'A','B'} and Region={'US'} and
[Channel={'A','B','C'}
OR
[Channel={'D'} and custno={'1','2,'3'}]]----this is separate set depends on CHannel D only not on whole set.
thanks
Try this:
sum({<GIDFLA={'0'},BS={'A','B'},Region={'US'},[Channel={'A','B','C'}>+<Channel={'D'},custno={'1','2,'3'}>}sales)
Regards
KC