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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
kris_vliegen
Partner - Creator III
Partner - Creator III

Sorting and using colors in Pivot Table

Hi All,


I have a pivot table.

I have a reference-station (collored in blue).

And if the pumpprice of an our for a station is equal to the pummprice of the reverence station it should color Orange, If it's more than I would like to see it in green and if the rpice is lower than than the price of the reference-station it should color red.

Now I do someting like this

=if(Site_Id_Name = Site_Id_NameEigen, rgb(195,227,255),

   if (round(avg(Pump_price),0.001) > round(avg(TOTAL <_CalYear, _CalMonth, _CalDay> {<Site_Id_Name={"$(=vEigenStation)"}  , _CalYearHour={"$(=vMaxDateHour)"} >}Pump_price),0.001), rgb(129,226,82),

   if (round(avg(Pump_price),0.001) = round(avg(TOTAL <_CalYear, _CalMonth, _CalDay> {<Site_Id_Name={"$(=vEigenStation)"}  , _CalYearHour={"$(=vMaxDateHour)"} >}Pump_price),0.001), rgb(255,128,0), rgb(240,102,68))))

But it isn't working for the hours.

How can I solve this?

And I would also like to sort on the highest hour.

sorting.JPG

Regards,

Kris

Labels (1)
0 Replies