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

Using Built-In Arrow Graphics

I have a text box where I want to use the built in graphics to indicate a trend direction (up or down, green or red), The formula I'm using is: =if(CPM_Delta='DownRed', 'qmem://<bundled>/BuiltIn/arrow_s_r.png', 'qmem://<bundled>/BuiltIn/arrow_s_g.png')

So this should show the down red arrow (arrow_s_r.png). But when I change the CPM_Delta to 'DownGreen' (or anything else) it doesn't change.

I've changed Representation to 'Image (in the Text Box)

What am I missing here?

Thanks

1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

Your sample app responds as expected, but the text box expression has the colours the wrong way round, and you have not set the image type for the expression in the table.

I think the text box should be:

=if(CPM_Delta='DownRed', 'qmem://<bundled>/BuiltIn/arrow_s_r.png', 'qmem://<bundled>/BuiltIn/arrow_s_g.png')

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

7 Replies
Anil_Babu_Samineni

This should work, Not sure where you made mistake.

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
vvira1316
Specialist II
Specialist II

Sample app and data may help to identify the issue.

jmonroe918
Creator II
Creator II
Author

Vijay:

Here's a sample file of what I am trying to do.

I'd like the arrow to respond per the active CPM_Trend (up_green, down_green, etc). I'd like to use it in a text object and in a column in the table.

Thanks

Jeff

Anil_Babu_Samineni

Why not?

Capture.PNG

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
vvira1316
Specialist II
Specialist II

Hi Jeff,

I'm sorry but I'm unable to open your QVW file due to personal edition limitation on my side. I hope others can help you. If you want to provide script and data then I can try it out.

BR,

Vijay

jonathandienst
Partner - Champion III
Partner - Champion III

Your sample app responds as expected, but the text box expression has the colours the wrong way round, and you have not set the image type for the expression in the table.

I think the text box should be:

=if(CPM_Delta='DownRed', 'qmem://<bundled>/BuiltIn/arrow_s_r.png', 'qmem://<bundled>/BuiltIn/arrow_s_g.png')

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
jmonroe918
Creator II
Creator II
Author

Jonathan:

I actually discovered that on my own last night and fixed it (and added more nested "if,then" statements (below) and it's working like a charm now. Thanks.

Jeff

=if(CPM_Delta='DownRed', 'qmem://<bundled>/BuiltIn/arrow_s_r.png',

(if(CPM_Delta='UpRed', 'qmem://<bundled>/BuiltIn/arrow_n_r.png',

(if(CPM_Delta='DownGreen', 'qmem://<bundled>/BuiltIn/arrow_s_g.png',

'qmem://<bundled>/BuiltIn/arrow_n_g.png')))))