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.
May be try this for the background color:
=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),
)))
Where is set analysis here? Not sure I understand the reference to set analysis
This would be the full formula, the set analysis will be triggered if get selectedcount >1
=if(getselectedcount([Issue Owned by])>1,
Sum({[Stats1]<[Issue Owned by]+={"$(=Only(left([Issue Owned by],index([Issue Owned by],'-')-2)))*"}*{"*|All"},[Risk label_M]-={'*Threshold'}>} distinct [Data M])
,
[Data M]
)
However the formula to set the background does not trigger if
getselected count >1
=If(Wildmatch([label_M],'*Red*'),RGB(255,0,0),
If(Wildmatch([label_M],'*Amber*'),RGB(255,191,0)))
Hi,
I have written a small QVW to explain my problem.
I am using getselectedcount on a field to switch between a set analysis statement and and normal statment.
When just 1 selection from the company field is selected the background colors work but when more than one selection from the company field is selected; then no background color, the set analysis works though.
Please try.
May be try this for the background color:
=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),
)))
Hi Neil,
You can try background color expression as
=if(Only({1}Company) = 'I',RGB(255,255,0),
if(Only({1}Company) ='H',RGB(0,255,0),
If(Only({1}Company)<>'I' or Only({1}Company)<>'R', RGB(255,0,0))))
Thanks for the reply Tamil, however the getselected code was key to this example.
I am using getselected count as a switch. the 2 formulas after are just examples of set analysis and a normal formula.
Thanks for looking into it.
Did you look at what I provided? Is this not what you were aiming for?
Hi Sunny,
It did not work as the getselectedcount part was removed.
The point of the formula is to set a color when a single company is selected, but when more that one customer is selected then use another color depending on the selection.
The set analysis for more the one could be selecting all companies with an 'I' in the title, but there is only 1 in my list
its really the 'form' of the function not the actual formula