Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello sir,
I need to do an statement for a set of data like this
if(count({$<[Project Status] = {'Completed'} >}Community) /Count(Community)>=0.9,Green(),
if(count({$<[Project Status] = {'Completed'} >} Community) /Count(Community)<0.9,LightGreen(),
if(count({$<[Project Status] = {'Completed'} >} Community) /Count(Community)<0.5, Blue()
if(count({$<[Project Status] = {'Completed'} >} Community) /Count(Community)<0.5,Red()))))
but it's not give me the desired result.
Regards
May be try this
if(count({$<[Project Status] = {'Completed'} >} Community) /Count(Community)<=0.49,Red(),
if(count({$<[Project Status] = {'Completed'} >} Community) /Count(Community)<0.5, Blue(),
if(count({$<[Project Status] = {'Completed'} >} Community) /Count(Community)<0.9,LightGreen(), Green())))
The last two conditions look the same, is that on purpose?
Sorry sir,
if(count({$<[Project Status] = {'Completed'} >}Community) /Count(Community)>=0.9,Green(),
if(count({$<[Project Status] = {'Completed'} >} Community) /Count(Community)<0.9,LightGreen(),
if(count({$<[Project Status] = {'Completed'} >} Community) /Count(Community)<0.5, Blue()
if(count({$<[Project Status] = {'Completed'} >} Community) /Count(Community)<=0.49,Red()))))
May be try this
if(count({$<[Project Status] = {'Completed'} >} Community) /Count(Community)<=0.49,Red(),
if(count({$<[Project Status] = {'Completed'} >} Community) /Count(Community)<0.5, Blue(),
if(count({$<[Project Status] = {'Completed'} >} Community) /Count(Community)<0.9,LightGreen(), Green())))
If we assume that IF() functions are evaluated in sequence, this expression only produces two colors:
The other expressions won't be evaluated because there will always be a match in the first two IF() calls.
Reorder your expression as:
IF (expr <= 0.49, Red(),
if (expr < 0.5, Blue(),
if (expr < 0.9, Lightgreen(),
Green())))
You may want to change the border values for the first two tests, because the blue color range will only match 0.49 < x < 0.5