Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a table with values like the following (simplified example):
Country ProductId Sales Spain 1 100 France 1 100 England 1 100 Portugal 1 100 Spain 2 50 France 2 50 England 2 50 Portugal 2 50
What I need is a Set Analysis expression where:
For France, only ProductId = 1 should be included
For all other countries, all ProductId values should be included
I know I can do something like:
If(Country = 'France', Sum({<ProductId={1}>} Sales), Sum(Sales))…but I do not want to use an if() outside the Set Analysis. I want the logic to be fully inside the Set modifier.
Something like this (which I know does not work):
Sum({<ProductId = {if(Country='France', 1, '*')}>} Sales)Is it possible to pass this conditional logic directly into the Set Analysis?
My goal is to avoid row‑level if() and keep everything inside the set.
Thanks
It seems like it would be much easier to just use two sums - one for France and one for everything else - and add those?
That said, the set analysis shouldn't be a problem using the union (+) operator and excluding France from one half:
{$<country -= {'France'}> + <country = {'France'}, ProductId = {1}>}
How about below?
Sum({<Country={'France'},ProductId = {1}>+<Country-={'France'}>} Sales)