Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

IF Function

qilk q.PNG

Hi I am having trouble creating and if function to change the background colour of cost >= 5000 within this table could anyone please help me correct my formula.

goods approved.PNG

hi, I was also wondering if it possible to create an if-function which generates a yes or no response based on whether a particular staff approved quantities greater than 3000 for the following table.

bill.PNG

Thanks in advance.

8 Replies
vinieme12
Esteemed Contributor II

Re: IF Function

if (Cost > 5000 , red() )

is cost a dimension in your table or expression?

Not applicable

Re: IF Function

Cost is a measure made up of quantity*unit price

Re: IF Function

Seems, You are working with Qliksense. There you need to write from Colors tab by using Measure. Then only it will give some output. Any how, Your expression seems okay. Would you tell us where do you copy and paste this expression.

PS: Still, you are not figure it out then please share QVF file with us

Re: IF Function

Measure means, Does this data point or you created any variable by name of Color.

Re: IF Function

Hi Shamila, in expression editor you can't use measures by name, you have to use the fields loaded in the app, I think the easiest way is to copy the content of the measure, like:

If(quantity*unit>5000, red())


I'm not fully understanding your second question. Maybe?:

If(sum(quantity)>3000, 'yes', 'no')

Not applicable

Re: IF Function

Hi guys, thanks for the help the first issue has been solved

Not applicable

Re: IF Function

The second question was could you generate an if function to create a new column  which says yes or no if payments greater than 3000 are approved by financial controller  

Re: IF Function

Good, If you got answer please close this thread

Community Browser