Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
mrthomasshelby
Creator III
Creator III

Help Create expression for Background Color in Pivot Table

Hello,

I have a data frame as in the attached excel file and a pivot table in the attached qvw file. I need help creating an expression for the background color of the cell in the pivot table. Here are the conditions for coloring the cell(named Total):

GreenIf at least one type of each Machine except Machine 2 is owned in at least one of the listed Shops. Machine 2 can be any of Owned/Leased/Outsourced,but at least one in Quantity. Proof should be submitted for relevant Machines. (Shop 1/2/3 Proof Submitted?)='YES'
YellowIf at least one type of each Machine except Machine 2 is Leased/Outsourced in at least one of the listed Shops. Machine 2 can be any of Owned/Leased/Outsourced,but at least one in Quantity. Proof should be submitted for relevant Machines. (Shop 1/2/3 Proof Submitted?='YES' )
RedIf any one type of machine is missing(not owned/outsourced/leased) from among the 8 machines in all the listed shops, or No proof submitted for machines,Red

For example, for this particular supplier file, there are 5 shops listed(AAA Shop,BS Engineering,GST Shop,GST2 Shop,OSD Machining).

Now there is at least one owned unit of each of the 8 machines in at least 1 of the listed shops.(AAA Shop). But he has not submitted the proof for these machines. So, the color of the total cell in the table will be red.

Any help is much much appreciated! Thanks in advance!

1 Reply
mrthomasshelby
Creator III
Creator III
Author

Hi stalwar1‌. Can you please kindly help me out here? Thanks! I have tried writing some long long if and statements in the script as well as some set analysis in the expression but none of them seem to work as per the conditions.