Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
ivandrago
Creator II
Creator II

Visual Cues not working as expected

Hi,

On the attached Document I only want the Vendor Price to turn Green if it is cheaper than the Order Price, it is currently doing this but I only want the one to turn green if its the cheaper out of the other vendors.

So for orderId = 1, all the VendorCodes have a cheaper price than the Actual OrderPrice, but the cheapest one is the VendorCode "HEW001" which I only want this to show as Green.

Thanks

1 Solution

Accepted Solutions
swuehl
MVP
MVP

I assume you want the cheapest price per productID, not per orderID, which is smaller than orderPrice.

Maybe like attached (or similar, when you need to apply other conditions). Look into the background color attribute expression.

View solution in original post

6 Replies
Anonymous
Not applicable

Ivan,

Unfortunately Visual Cues don't work with expressions, we can use only numbers.  Try, for example 13 and see that it works.

For colors depending on expressions, use attribute expression for background color.

Regards,

Michael

amars
Specialist
Specialist

Hi Evan,

Rather than Visual Cues, you can use Expression's Background Color and Text Color.

Please find you example attached here.

Thanks

ivandrago
Creator II
Creator II
Author

Hi Michael,

It still is highlighting all of the prices, I only want it to hightlight the cheapeat one for each orderid?

So for example orderId 2, I only want the Price for the VendorCode "HEW001" to be highlighted as that is the cheapest one out of the 3 thanks.

Thanks

swuehl
MVP
MVP

I assume you want the cheapest price per productID, not per orderID, which is smaller than orderPrice.

Maybe like attached (or similar, when you need to apply other conditions). Look into the background color attribute expression.

christophebrault
Specialist
Specialist

Hi,

Please try this expression as background colour of your expression :

if(sum(Price)<sum(OrderPrice)

and aggr(rank(-sum(Price))=1,productId,VendorCode)

,LightGreen())

Replace productId with orderid if you only want this for order and not product

Inscrivez vous à ma Newletter Qlik
DoNotMissQlik- Connect with me on Linkedin
neetu_singh
Partner - Creator III
Partner - Creator III

Hi,

Please find attached qvw, it will help you out. Have exactly done as per your requirement.

Regards

Neetu Singh