Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

expressão

Bom Dia,

eu estou colocando uma condição para cor no gráfico, porem da erro de expressão

if([Qt Atual]>'1.000',blue(),

      if([Qt Atual]>'500',green(),

           if([Qt Atual]>'200',RGB(255 255 0),

                 if([Qt Atual]>='50',RGB(255 255 0),red()))))

eu não estou conseguindo identificar o erro, alguém pode me ajuda?

Obrigada.

1 Solution

Accepted Solutions
Not applicable
Author

Sorry. I should have realized this was Qlik Sense.

Here is screenshot showing bar colors by expression in Qlik Sense.

I used this expression:

if(sum(Expression2)>500, Blue(), if(sum(Expression2)>100, yellow(), green()))colorExpression.jpg

View solution in original post

18 Replies
ogster1974
Partner - Master II
Partner - Master II

Assuming you have no syntax issues with your statement

1.000 replace with 1000

Also make sure your expression matches the measure expression of your line chart so perhaps sum([Qt Atual])

Not applicable
Author

então eu fiz assim:

if(sum([Qt Atual])>'1000',blue(),

if(sum([Qt Atual])>'500',green(),

if(sum([Qt Atual])>'200',RGB(255 255 0),

if(sum([Qt Atual])>='50',RGB(255 255 0),red()))))

e mesmo assim não deu certo.

ogster1974
Partner - Master II
Partner - Master II

when you say failed are you getting a code error or is the result you are looking for on your chart not what you expected?

Not applicable
Author

Then the error I say is that when I type the above expression says so EXPRESSION OF ERROR.

Então o erro que eu digo é que quando eu digito a expressão acima diz assim ERRO DE EXPRESSÃO.

Note: Edited by moderator to include English translation as a courtesy.

qepmalheiros
Contributor III
Contributor III

Tente assim:

if (sum ([Qt Atual])> 1000, azul (),

if (sum ([Qt Atual])> 500, verde (),

if (sum ([Qt Atual])> 200, RGB (255 255 0),

if (sum ([Qt Atual])> = 50, RGB (255 255 0), vermelho ()))))


[]´s

Not applicable
Author

Obrigada por me ajudar, mas mesmo assim não deu certo, da erro na expressão, e eu não consigo encontrar o erro...

sacosta5
Contributor III
Contributor III

Hi Daniela,

don´t forguet "," ....

if (sum ([Venta])> 1000, blue (),

  if (sum ([Venta])> 500, Green (),

       if (sum ([Venta])> 200, RGB (255, 255, 0),

            if (sum ([Venta])> = 50, RGB (255, 255, 0), red ())

          )

      )

  )

Not applicable
Author

Hi,

Silvana

The Error continue...

Not applicable
Author

Hi,

Are you perhaps trying to change the background color of a data point?

Then make sure you are using the background color expression attributeexpressionColor.jpg