10 Replies Latest reply: Mar 9, 2016 5:38 AM by margaux devay

# creation of an indicator with conditions

Hello,

I am trying to create an indicator in Qlik

if my "dif date" is Superior to 90 days , i want to sum those value and divided by the total .

If the result is Superior to 4% led red if inferior led green

my unworking formula :

= if((Diff_Date > 90 , sum(([Value]) / ( Value)) < 0.04),'qmem://<bundled>/BuiltIn/led_g.png','qmem://<bundled>/BuiltIn/led_r.png')

Thank you  for your help !

• ###### Re: creation of an indicator with conditions

Hi Margaux,

Try,

= If(Diff_Date > 90 , If( ( Sum(Value) / Sum(Total Value) ) < 0.04, 'qmem://<bundled>/BuiltIn/led_g.png','qmem://<bundled>/BuiltIn/led_r.png'))

If this is not working, please share your file (or provide sample file)

• ###### Re: creation of an indicator with conditions

Hi Tamil,

Thank you for your time

It is still not working i cannot see the led "green or red" on my pivot table.

Do you have an other idea that i can try ?

Thanks

Margaux

• ###### Re: creation of an indicator with conditions

Create a new expression like below and see what are all the values you are getting.

= If(Diff_Date > 90 , Sum(Value) / Sum(Total Value) )

• ###### Re: creation of an indicator with conditions

Hey Tamil,

i created a new expression with the formula and the result is empty

• ###### Re: creation of an indicator with conditions

Hi Margaux,

You will see empty cells because you have not not mentioned else part in the "If" condition ( If Diff_Date is less than 90.???).

I have changed the expression representation from "Traffic light Gauge" to "Image".

Since you have not mentioned how to show the Diff_Date values that are less than 90 days, you will not see any indicators.

You can understand the problem by checking the attached file. How you wish to see the chart.? Could you elaborate further.?

• ###### Re: creation of an indicator with conditions

PFA

Vikas

• ###### Re: creation of an indicator with conditions

Hi Vikas,

I didn't know that we can have a gauge

Still i have a problem with my first condition :

The measurement is Open work with aging > 90 days amount / total amount open work orders.

If the result is above 5%, it is a warning status.

exemple

 Aging Range Amount i<1month 26,3 112months 0,0 Grand total 30,4 Open work orders > 3 months amount 1,1 Measurement 4%

Thank you,

• ###### Re: creation of an indicator with conditions

Pl;ease attach your qvw

• ###### Re: creation of an indicator with conditions

Hey Tamil,

It is working

Thank you very much