Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
How we can write OR condition in set analysis.
Sum({$<[Distribution Channel Desc]={'A','B','C'} or ([Distribution Channel Desc] = {'D'} and customerno = {'1','2','3'})>} Sales)
Thanks
SUM({$<[Distribution Channel Desc]={'A','B','C'}>*<[Distribution Channel Desc] = {'D'},customerno = {'1','2','3'} >}Sales)
Try:
Sum({<[Distribution Channel Desc]={'A','B','C'}>+
<[Distribution Channel Desc] = {'D'} , customerno = {'1','2','3'})>} Sales)
Marc.
what is the important of * here
* is an intersection that returns a set consisting of the records that belong to both operands (typical AND)
I believe a Union + would be more appropriate in this case.
SUM({$<[Distribution Channel Desc]={'A','B','C'}>+<[Distribution Channel Desc] = {'D'},customerno = {'1','2','3'} >}Sales)
Hi,
Try below expression
SUM({$<[Distribution Channel Desc]={'A','B','C'}>+<[Distribution Channel Desc] = {'D'},customerno = {'1','2','3'} >}Sales)
+ for Union * For Intersection
Go with this
Sum({<[Distribution Channel Desc]={'A','B','C'}>+
<[Distribution Channel Desc] = {'D'} , customerno = {'1','2','3'})>} Sales)
Check the attached document for more details
Regards
ASHFAQ
Try
SUM({$<[Distribution Channel Desc]={'A','B','C'}>+<[Distribution Channel Desc] = {'D'},customerno = {'1','2','3'} >}Sales)
Hi
Try this
Sum({$<GIDRDDNullFlag = {'0'},[Business Segment] = {'Power Components','Power Equipment'},
[Suspension Flag - MM]={'#'},Pole={'NA'},[Item Category]={'*'} -{'ZSPK','ZSK1'},newDueIndicator={'1.OVD'},
[PSI Code]={'*'} - {'S11'},[Sold To No]={'*'} - {'9950016'},[Distribution Channel Desc]={'Distribution','Other','Direct'} > +
<GIDRDDNullFlag = {'0'},[Business Segment] = {'Power Components','Power Equipment'},
[Suspension Flag - MM]={'#'},Pole={'NA'},[Item Category]={'*'} -{'ZSPK','ZSK1'},newDueIndicator={'1.OVD'},
[PSI Code]={'*'} - {'S11'},[Sold To No]={'*'} - {'9950016'}, [Distribution Channel Desc] = {'Intercompany'},[Sold To No] = {'9465653','9465654','9465655','9465716','9465718','9465720'}>}
} sales)
Hi, maybe using different sum is easier:
Sum({$<GIDRDDNullFlag = {'0'},[Business Segment] = {'Power Components','Power Equipment'},
[Suspension Flag - MM]={'#'},Pole={'NA'},[Item Category]={'*'} -{'ZSPK','ZSK1'},newDueIndicator={'1.OVD'},
[PSI Code]={'*'} - {'S11'},[Sold To No]={'*'} - {'9950016'},[Distribution Channel Desc]={'Distribution','Other','Direct'}>} sales)
+ Sum({$<GIDRDDNullFlag = {'0'},[Business Segment] = {'Power Components','Power Equipment'},
[Suspension Flag - MM]={'#'},Pole={'NA'},[Item Category]={'*'} -{'ZSPK','ZSK1'},newDueIndicator={'1.OVD'},
[PSI Code]={'*'} - {'S11'},[Sold To No]={'9465653','9465654','9465655','9465716','9465718','9465720'}, [Distribution Channel Desc] = {'Intercompany'}>} sales)