I have a unique situation with
Country, CountryGroup
A,
B, BB
C, BB
D,
E, CC
I have metrics with Country as the dimension. I would like to display all values for Country excluding those values selected in Country Group. If BB is selected, then countries associated with CC + null() values in Country Group should be displayed.
The metric has 6 nested variables as components which makes it overbearing to simply embed set analysis in each variable only to be recomputed for each selection.
I have tried in expression
1. SUM({<Country = {*} - P({<CountryGroup = {$(= Concat(DISTINCT CountryGroup, ',')) }>} Country)>} variable)
2. SUM({<Country -= P({<CountryGroup = {$(= Concat(DISTINCT CountryGroup, ',')) }}>} Country)>} variable)
As calculated Dimension
1. If (Match([CountryGroup], CONCAT(Distinct CountryGroup, ',')) = 0, Country, null())
all to no success. Any thoughts? There can be spaces in the Group field so I also tried with chr(39) around the concat with ',' as the delimiter