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

Adding conditional formatting to a pivot table that uses ValueLoop

I have a pivot table where I have used ValueLoop to get the layout correct as a simple pivot table did not return all the data.  However, I would like to add conditional formatting (change the background colour) depending on the value of a field which is not in the pivot table.  Is this possible?  

Thanks

8 Replies
Kushal_Chawda

@LizWhit  what is the expression?

LizWhit
Contributor
Contributor
Author

@Kushal_Chawda thanks for replying.  The expression is:

=subfield(concat(distinct [Bay / Bed],','),',',valueloop(1,25))

There are two dimensions, [Bedstay Ward] and =valueloop(1,25) and I would like the background of the [Bay / Bed] cell to change based on the value of another field called Status.

Thanks

Kushal_Chawda

@LizWhit  so what is the logic to color based on status?

LizWhit
Contributor
Contributor
Author

@Kushal_Chawda 

=if(Status = 'Positive ',Colour_Red,if(Status = 'Past',Colour_WebsiteBlue, if(Status = 'Negative ',Colour_Green  etc etc. 

thanks

Kushal_Chawda

@LizWhit  Would you be able to share a sample data with expected output?

LizWhit
Contributor
Contributor
Author

@Kushal_Chawda this is a screenshot of the report as it stands

QV screenshot.PNG

The field to the left is the Dimension [Bedstay Ward] and the cells to the right is the Expression with the value loop. I would like the cells to change colour depending on the status.  Below is a simple pivot table with the same fields where the formatting works, but it is not the layout that I want:

QV screenshot3.PNG

Thanks

Brett_Bleess
Former Employee
Former Employee

Perhaps the following Design Blog post may be helpful:

https://community.qlik.com/t5/Qlik-Design-Blog/Colors-in-charts/ba-p/1475280

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.
LizWhit
Contributor
Contributor
Author

Thanks for this Brett, it is certainly useful to streamline the use of colours, but unfortunately it does not resolve my particular issue.  I suspect what I am trying to do is not doable.  I am using a workaround of multiple pivot tables (one for each [Bedstay Ward].  Not ideal because it doesn't pick up new values, but the best option I have found. Thanks

Liz