Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am trying to develop report showing all suppliers belonging to two Diversity Categories:
Sum({$<[DIVERSITY DEFINITION]={'SMALL BUSINESS'} AND {'DISADVANTAGED BUSINESS'}>}[Line Amount])
The "AND" operator as used above does not work ofcourse.
Please note that the expression:
Sum({$<[DIVERSITY DEFINITION]={'SMALL BUSINESS', 'DISADVANTAGED BUSINESS'}>}[Line Amount])
is an "OR" operation which includes all Vendors with either Diversity Definition. This is not what I need.
Thank you!
Do you have both of the categories in the same Dimension(column)?
Like:
[DIVERSITY DEFINITION]
some text...SMALL BUSINESS', 'DISADVANTAGED BUSINESS..
....
...SMALL BUSINESS', 'DISADVANTAGED BUSINESS some text...
It would make sense for me if your categories SMALL BUSINESS', 'DISADVANTAGED BUSINESS where spread out into two dimensions and then you want use AND.
Robert,
Yes both belong to the same Dimension [Diversity Definition].
Unfortunately its not possible for me to split them out because there are 10-15 different [Diversity Definitions].
2 ideas
sum({$ <Supplier={"=count({$ <[DIVERSITY DEFINITION]={'SMALL BUSINESS','DISADVANTAGED BUSINESS'}>} distinct [DIVERSITY DEFINITION])=2"}>} [Line Amount])
if(concat(DISTINCT [DIVERSITY DEFINITION], '@')='DISADVANTAGED BUSINESS@SMALL BUSINESS',
sum([Line Amount])
)
how about:
Sum({$<[DIVERSITY DEFINITION]={'SMALL BUSINESS'}>*<{'DISADVANTAGED BUSINESS'}>} [Line Amount])
regards
The first idea seems to be working in my test case. I will get back after I test it on my entire data.
Thank you!