Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am trying to create a report showing only those Cust Keys where Last Month the Add Indicator = Y OR the Type Code = 123 AND where This Month the Add Indicator = N OR the Type Code <>123 OR the Status = C
Any help?
I tried this - and yes, it failed......
only({<[Account] = P({1<[Date] = {'$(vLastMonth)'}
,[Add Indicator] = {'Y'}
>})
+
P({1<[Date] = {'$(vLastMonth)'}
,[Type Code] = {'123'}
>})
+
P({1<[Date] = {'$(vMaxDate)'}
,[Add Indicator] = {'N'}
>})
+
P({1<[Date] = {'$(vMaxDate)'}
,[Type Code] <> {'123'}
+
P({1<[Date]={'$(vMaxDate)'
,[Status]={'C'}
>})
>}[Cust Key]
)
Hard to tell with no information about your model or expression context.
In addition, 'it failed' is not a good description of what you get compared to what you expected to get.
For now, I can't see how you've handled the AND part of your requirement, so maybe try using an intersection operator and few parenthesis:
only({<[Account] =
(
P({1<[Date] = {'$(vLastMonth)'}
,[Add Indicator] = {'Y'}
>})
+
P({1<[Date] = {'$(vLastMonth)'}
,[Type Code] = {'123'}
>})
)
*
(
P({1<[Date] = {'$(vMaxDate)'}
,[Add Indicator] = {'N'}
>})
+
P({1<[Date] = {'$(vMaxDate)'}
,[Type Code] <> {'123'}
+
P({1<[Date]={'$(vMaxDate)'
,[Status]={'C'}
>})
)
>}[Cust Key]
)
Hard to tell with no information about your model or expression context.
In addition, 'it failed' is not a good description of what you get compared to what you expected to get.
For now, I can't see how you've handled the AND part of your requirement, so maybe try using an intersection operator and few parenthesis:
only({<[Account] =
(
P({1<[Date] = {'$(vLastMonth)'}
,[Add Indicator] = {'Y'}
>})
+
P({1<[Date] = {'$(vLastMonth)'}
,[Type Code] = {'123'}
>})
)
*
(
P({1<[Date] = {'$(vMaxDate)'}
,[Add Indicator] = {'N'}
>})
+
P({1<[Date] = {'$(vMaxDate)'}
,[Type Code] <> {'123'}
+
P({1<[Date]={'$(vMaxDate)'
,[Status]={'C'}
>})
)
>}[Cust Key]
)
Thank you for the help, the