Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
In my bar chart I would like to show the max and min Amound in different colours, somehow this works in year 2012 YTD only but not in the other 2 years. Can anyone tell me what is wrong with my formula? Would be great if anyone could help.
if(GetSelectedCount(Periode)=1,
if(sum([Kurzfristige Überschusshöhe])<= min(TOTAL [Kurzfristige Überschusshöhe]),Lightred(),
if(sum([Kurzfristige Überschusshöhe])>= max(TOTAL [Kurzfristige Überschusshöhe]),Green(),
if((Periode=2011 and sum([Kurzfristige Überschusshöhe])> min(TOTAL([Kurzfristige Überschusshöhe]))), LightGray (),
if((Periode=2011 and sum([Kurzfristige Überschusshöhe])< max(TOTAL([Kurzfristige Überschusshöhe]))), LightGray (),
if((Periode='2012 HR' and sum([Kurzfristige Überschusshöhe])> min(TOTAL([Kurzfristige Überschusshöhe]))),Black (),
if((Periode='2012 HR' and sum([Kurzfristige Überschusshöhe])< max(TOTAL([Kurzfristige Überschusshöhe]))),Black (),
if((Periode='2012 YTD' and sum([Kurzfristige Überschusshöhe])> min(TOTAL([Kurzfristige Überschusshöhe]))),Black (),
if((Periode='2012 YTD' and sum([Kurzfristige Überschusshöhe])< max(TOTAL([Kurzfristige Überschusshöhe]))),Black ())))))))))
Hi,
if I understand your request correctly, I think one issue is that you need to aggregate the kurzfr. Überschusshöhe prior to finding the min/max. You can do this using advanced aggregation, maybe along these lines
if(GetSelectedCount(Periode)=1,
if(sum([Kurzfristige Überschusshöhe])<= min(total<Periode> aggr( sum([Kurzfristige Überschusshöhe]),Periode,Versicherungsnehmer))+0.1, Lightred(),
if(sum([Kurzfristige Überschusshöhe])>= max(total<Periode> aggr( sum([Kurzfristige Überschusshöhe]),Periode,Versicherungsnehmer))-0.1, Green(),
LightGray()
)))
I needed to add small numbers (could be even much smaller, like the smallest amount that could be represented), since QV seemed to have problems with comparing the floating point values on at least one minimum value (Comparing floating point values is always an issue, I assumed it should work here since the calculations are essentially identical, but I was wrong).
See also attached.
Regards,
Stefan
Hi,
if I understand your request correctly, I think one issue is that you need to aggregate the kurzfr. Überschusshöhe prior to finding the min/max. You can do this using advanced aggregation, maybe along these lines
if(GetSelectedCount(Periode)=1,
if(sum([Kurzfristige Überschusshöhe])<= min(total<Periode> aggr( sum([Kurzfristige Überschusshöhe]),Periode,Versicherungsnehmer))+0.1, Lightred(),
if(sum([Kurzfristige Überschusshöhe])>= max(total<Periode> aggr( sum([Kurzfristige Überschusshöhe]),Periode,Versicherungsnehmer))-0.1, Green(),
LightGray()
)))
I needed to add small numbers (could be even much smaller, like the smallest amount that could be represented), since QV seemed to have problems with comparing the floating point values on at least one minimum value (Comparing floating point values is always an issue, I assumed it should work here since the calculations are essentially identical, but I was wrong).
See also attached.
Regards,
Stefan
Hi Stefan,
That's it! First time in two days I have a big smile on my face in front of QV.
Regards
Nicole