Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am attempting to have a default bar chart coloured.
When a User initially opens the Dashboard, the SLA Entire Risk Engine batch details will appear and where minutes are negative, bars should be red and where minutes are positive bars should be green (will change colour for colour blind people another time).
The code works fine if I don't use a default selection but when I introduce a default selection the positive minutes red instead of green.
If((isnull(Milestone) AND Min({<System={'Source'},Milestone={'Entire Risk Engine batch'},Status={'Breach'}>} Minutes))<0,
rgb(255,110,110),
If((isnull(Milestone) AND Max({<System={'Source'},Milestone={'Entire Risk Engine batch'},Status={'Breach'}>} Minutes))>0,
Green(),
If(Min({<System={'Source'},Status={'Breach'}>} Minutes)<0,
rgb(255,110,110),
Green(),
)))
Here is your original app with my changes in the one bar chart visualisation:
Hello Cameron you can use
if(If(isnull(Milestone),
Min({<System={'Source'},Milestone={'Entire Risk Engine batch'},isExclusion={0}>} Minutes),
Min({<System={'Source'},isExclusion={0}>} Minutes))<0,rgb(255,110,110),green())
instead of your declaration.
I have not dug deeper into your qvf file, but is there a reason your use Min < 0 and Max > 0 check? Why not both mins or both maxs?
That fixes the default selection but as soon as another Milestone is selected than the problem persists.
Cos all other variations have not worked and when I change to both Min then I still have the problem.
Apologies, I was wrong in my statement, this works.
and spoke to soon again as for some reason I have a problem on the chart next to it now
I have not fixed it and it works on both charts.
While I have fixed one issue I still have another issue on this chart. I thought this expression would only include dates where Is exclusion = 0 but it still shows dates even though I have this exclusion. If I select the isExclusion filter the chart does not change either.
If(isnull(Milestone),
Min({<System={'Source'},Milestone={'Entire Risk Engine batch'},isExclusion={0}>} Minutes),
Min({<System={'Source'},isExclusion={0}>} Minutes))
Try unchecking "Show zero values"