Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Problem with indicators

Hello Everyone,

I am showing indicators at my dashboard,

when the value is greater than zero i should show green arrow,

when the value is less than zero i should show the red arrow,

when the value is equal to zero or is null i should show the yellow arrow,

i wrote bellow code, it is giving me red arrow when the value is zero or null

=if((round(((((((sum({$<Year={$(v_Year)}>}(Property*ROOMS))

/(sum(ROOMS)*Days))))/((sum({$<Year={$(PY)}>}(Property*ROOMS))/(sum({$<Year={$(PY)}>}ROOMS)*v_CDays_PY)))))-1 )*100, 0.11) & '%')<0,

'qmem://<bundled>/BuiltIn/arrow_w_r.png',

if((round(((((((sum({$<Year={$(v_Year)}>}(Property*ROOMS))/(sum(ROOMS)*v_CDays))))/ ((sum({$<Year={$(PY)}>}(Property*ROOMS))/(sum({$<Year={$(PY)}>}ROOMS)*v_CDays_PY)))))-1 )*100, 0.11) & '%')>0,

'qmem://<bundled>/BuiltIn/arrow_s_g.png',

if((round(((((((sum({$<Year={$(v_Year)}>}(Property*ROOMS))/(sum(ROOMS)*v_CDays))))/ ((sum({$<Year={$(PY)}>}(Property*ROOMS))/(sum({$<Year={$(PY)}>}ROOMS)*v_CDays_PY)))))-1 )*100, 0.11) & '%')=0,

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


Can anybody help into this,


Thanks

2 Replies
ecolomer
Master II
Master II

Can you upload qvw file?

PrashantSangle

Hi,

Try like

Remove &'%' from your expression then try

if((round(((((((sum({$<Year={$(v_Year)}>}(Property*ROOMS))
/(sum(ROOMS)*Days))))/((sum({$<Year={
$(PY)}>}(Property*ROOMS))/(sum({$<Year={$(PY)}>}ROOMS)*v_CDays_PY)))))-1 )*100, 0.11) )<0,
'qmem://<bundled>/BuiltIn/arrow_w_r.png',
if((round(((((((sum({$<Year={
$(v_Year)}>}(Property*ROOMS))/(sum(ROOMS)*v_CDays))))/ ((sum({$<Year={$(PY)}>}(Property*ROOMS))/(sum({$<Year={$(PY)}>}ROOMS)*v_CDays_PY)))))-1 )*100, 0.11))>0,
'qmem://<bundled>/BuiltIn/arrow_s_g.png',
'qmem://<bundled>/BuiltIn/arrow_ne.png'))

Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂