Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I have value field called 'Sales' and two category fields, for example 'CategoryA' and 'CategoryB'.
I want to include the expression sum(Sales) but only where CategoryA OR CategoryB equal "ProductA"
What would the set analysis be?
Thanks
A
May be as below:
Sum({$<CategoryA={'ProductA'}> + <CategoryB={'ProductA'}>} Sales)
This looks good, however I want to include other set analysis criteria. Here is the actual expression I am using, but it's telling me there is an error
sum({<[XL Date]={"<=$(vLatestReturnsDate)"},[Ledger Type]={"Actual"},[Commission Of]={"Salads"}+[Trading Of]={"Salads"}>}[Hds/Kg KPI])
it would be then
sum({<CategoryA ={'ProductA'}>+< CategoryB={'ProductA'}>} sum(Sales))
Try this
sum({<[XL Date]={"<=$(vLatestReturnsDate)"},[Ledger Type]={"Actual"},[Commission Of]={"Salads"}>+
<[XL Date]={"<=$(vLatestReturnsDate)"},[Ledger Type]={"Actual"},[Trading Of]={"Salads"}>}[Hds/Kg KPI])
=Sum({<CategoryA={'ProductA'},CategoryB={'ProductA'}>}Sales)
Replace the +[Trading Of]={"Salads"} with ,[Trading Of]={"Salads"}
Try this:
Sum({<[XL Date] = {"<=$(vLatestReturnsDate)"}, [Ledger Type]={"Actual"}, [Commission Of]={'Salads'}> +
<[XL Date] = {"<=$(vLatestReturnsDate)"}, [Ledger Type]={"Actual"}, [Trading Of]={'Salads'}>}[Hds/Kg KPI])