Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I can't set the background colour with an expression.
The expression formula switches between set analysis and normal output based on a condition.
=if(getselectedcount([Header])>1,
Sum([Alternate State 1]...<Set Analysis>),
DATA
)
The formula in the background color is
=If(Wildmatch([label_M],'*Red*'),RGB(255,0,0),
If(Wildmatch([label_M],'*Amber*'),RGB(255,191,0)))
And label_M is is a field in the pivot table.
The label_M field in both conditions returns a Red and a Amber field, why won't the colour work when the set analysis condition is true?
Thanks.
We did not remove anything from the expression Neil. We only changed the expression for the background color.
UPDATE:
What it was
Background Expression:
=if(not wildmatch(Company,'I','H'),RGB(255,0,0),
if(wildmatch(Company,'I'),RGB(255,255,0),
if(wildmatch(Company,'H'),RGB(0,255,0),
)))
Actual Expression:
=if(getselectedcount(Company)>1,
Sum({<Company={I}>} distinct Sales)
,
Sales
)
New
Background Expression:
=if(not wildmatch(Only({<Company>} Company),'I','H'),RGB(255,0,0),
if(wildmatch(Only({<Company>} Company),'I'),RGB(255,255,0),
if(wildmatch(Only({<Company>} Company),'H'),RGB(0,255,0),
)))
Actual Expression:
=if(getselectedcount(Company)>1,
Sum({<Company={I}>} distinct Sales)
,
Sales
)
No change to your actual expression
Sorry I must have saved the update for the color over the expression.
If more than 1 company is selected, then the set analysis part of the if statement triggers.
But this should be colored yellow as the expression points at set analysis.
Thanks.
I see yellow Neil