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

Conditional Background Color

Hello,

I have this expression in the background color of my Sales Order dimension:

=if(aggr(count([Prod. Order]), [Sales Order #])>=2,YELLOW())

It seems to only turn the sales order row yellow when there are two production orders (also in my dimensions) for that sales order. I was hoping that the above logic would highlight the sales orders that have more than two production orders as well. But, this is what I'm getting:

Can someone please advise on how to get this to work in the cases that there are 3 or more production orders per sales order?

Thanks a ton,

Ron

1 Solution

Accepted Solutions
Not applicable
Author

Hi,

try

=If(Count(total<[Sales Order #]> [Prod. Order]) >=2,Yellow())

View solution in original post

3 Replies
Not applicable
Author

Hi,

try

=If(Count(total<[Sales Order #]> [Prod. Order]) >=2,Yellow())

Not applicable
Author

Hi Ron

Please check this example file

Which is attached in the thread.

Anonymous
Not applicable
Author

Thank you both for your responses. Andrei's answer worked best for my case, but there are some great examples found in the above .qvw file. There are some cases where there is a production order firming (still a planned order, this is SAP) and the 2nd oncoming production order is currently displaying as null (can't count a null). You can see an example of this in my screenshot. The Sales Order cells won't highlight in this case. That's OK though. The requirement should be satisfied.

Thanks again,

Ron