Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
ashok1203
Creator II
Creator II

pivot table dimension background color issue

Hi All,

Below is the pivot table that we need create in application based on the attached Source data. For the Field Priority i need to display a background colours based on the field value.

If the value is 1,2 -> red()

3,4 -> yellow()

others-> green()

Capture.PNG

i tried this through dimension background color if conditions, pick match functions and Custom Format cell colors but not working as excepted. Please help me to achieve the output as expected.

Attached the Qvw file for reference.

AAK
1 Solution

Accepted Solutions
sunny_talwar

Do you need this?

Capture.PNG

Uncheck 'Suppress Zero Value' on the presentation tab

View solution in original post

12 Replies
Colin-Albert

What expression are you using for the background colour?

These expressions work for the dimension background colour.

Click [+] to expand the dimension options next to the dimension name.

Try

If(match(Priority, 1, 2) , red(),

If(match(Priority, 3,4) , yellow(), green()

))

or

If(Priority <=2 , red(),

If(Priority <=4, yellow(), green()

))

ashok1203
Creator II
Creator II
Author

Hi Colin,

Thanks for response, i have tried by using the above expression but not getting the output as expected.

If i select any value in Priority then it was showing correct color as per given condition but by default it was not expected. Please use the above attached data in sample application and help me in this regard.

Thanks

AAK
ashok1203
Creator II
Creator II
Author

Guys, Any one help me on this thread.

AAK
Colin-Albert

Can you show your colour expression and a screenshot of the result.

ashok1203
Creator II
Creator II
Author

The screenshot of result i am getting is above mentioned thread screenshot.

The condition i am using is

If(priority=1 or priority=2, red(),

If(priority=3 or priority=4, yellow(),

Green()))

I tried by using the pick match and some other if match statements.

When i use the same condution in straight table it was working,  in pivot also it was working if we display the data in normal, when ever i am dragging the field from row to column it was showing this mentioned screen error.

AAK
nevilledhamsiri
Specialist
Specialist

Dear!

Please see how this may fit in to your requirement!

Regards

Neville

ashok1203
Creator II
Creator II
Author

Hi Neville,

Thanks for your response. I have a around 420 items in that field. So, i can't implement different different expressions for all those.

AAK
ashok1203
Creator II
Creator II
Author

stalwar1gwassenaar‌ please try to help me on this

AAK
sunny_talwar

Do you need this?

Capture.PNG

Uncheck 'Suppress Zero Value' on the presentation tab