Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
b_garside
Partner - Specialist
Partner - Specialist

Conditional formatting in Pivot table not working propoerly

I have a Pivot table that displays bandwidth as a percentage 0-1. I have bands of colors 5 of them based on .2 intervals.

For whatever reason my formula is not treating the colors equally. If I use a single column straight table it works fine.

In some cases a value done not get any color.

Unfortunately I can not upload a QVW on this one since its a customer.

Bandwitdht ranges usually in increments of 1.6 but once summed up you get larger values but the max rang is 95 on any given hour.

vDayScale = 30.42

MaxBandWidthRange = 95

eBandWidth = (Sum(BandWidth) / vDayScale) / MaxBandWidthRange

If( $(eBandWidth) >= 1 , RGB(0,110,255) ,
If( $(eBandWidth) >= .8 and $(eBandWidth) <= .99 , RGB(40,140,255) ,
If( $(eBandWidth) >= .60 and $(eBandWidth) <= .79 , RGB(75,155,255) ,
If( $(eBandWidth) >= .40 and $(eBandWidth) <= .59 , RGB(110,175,255) ,
If( $(eBandWidth) >= .20 and $(eBandWidth) <= .39 , RGB(145,195,255) ,
If( $(eBandWidth) >= .01 and $(eBandWidth) <= .19 , RGB(221,240,255)
      )  )  )  )  )  )

2013-12-20_132614.png

12 Replies
swuehl
MVP
MVP

If( $(eBandWidth) >= 1 , RGB(0,110,255) ,
If( $(eBandWidth) >= .8 and $(eBandWidth) < 1 , RGB(40,140,255) ,
If( $(eBandWidth) >= .60 and $(eBandWidth) < .8 , RGB(75,155,255) ,
If( $(eBandWidth) >= .40 and $(eBandWidth) < .6 , RGB(110,175,255) ,
If( $(eBandWidth) >= .20 and $(eBandWidth) < .4 , RGB(145,195,255) ,
If( $(eBandWidth) >= .0 and $(eBandWidth) < .2 , RGB(221,240,255)
      )  )  )  )  )  )

b_garside
Partner - Specialist
Partner - Specialist
Author

Yeah I kept the % expression in place for the coloring.

But changed the main one to sum(BandWidth) to see the raw values accumaulated

b_garside
Partner - Specialist
Partner - Specialist
Author

That did the trick. Duh... simple tweak. Thanks!