Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Conditional expression in QlickView(urgent)

Hi ALL,

I want to write one conditional expression in QV for my chart.

In the expression i want to write something like

if(month(DateId)< Current month, actual abos,plannedabos)

Could anyone please send me the correct syntax for the same, i need this urgent.

Thanks,

Mahasweta

10 Replies
Not applicable
Author

Replace the 'Current Month' by month (today()). Will that solve your issue?
Not applicable
Author

Hi , i wrote the expression as

sum

(if(month(DATE_ID)) < month(today),ACTUAL_ABSORPTION,PLAN_ABSORPTION

)

But am not getting the desired result in my chart.

Could you please further guide me?

Thanks,

Mahasweta





Not applicable
Author

sum



( if( month(DATE_ID) < month(today)

, ACTUAL_ABSORPTION

, PLAN_ABSORPTION

)

)

Not applicable
Author

Hi,

I implemented the same ,still its not working.Actually am getting some value but not correct.

one idea is the Date need to be in which format, means "mm/dd/yyyyy" or what as in my database.

I mean what should be the Date type here., as in my DB i have the Date as varchar but the format is "yyyy/mm/dd".

Please suggest me here.

Thanks,

Mahasweta

prieper
Master II
Master II

Hi,

please check, whether you are using same dateformats, probably might also help to insert MonthStart-function in order to avoid disturbances with dates and timestamps.

HTH
Peter

Not applicable
Author

Hi,

Could you please help me in the below expression,

i want something like

sum(if((month(Date)) < month(today),ACTUAL_ABSORPTION,' ')

means if true i should get actual abos else nothing.

How to get the else part for nothing?

Thanks,

Mahasweta

biester
Specialist
Specialist

Hi,

it seems that there's a mistake with parentheses. I think it should be

Corrected:

if( (month(Date) < month(today() ) ) , ACTUAL_ABSORPTION,' ')

Rgds,
Joachim

Not applicable
Author

it is today() not today
Not applicable
Author

Hi All ,

my expression is like this and am getting the values.

sum(if((month(Date)) < month(today()),ACTUAL_ABSORPTION,0))

But here the values are not coming according to the month.Here am plotting my graph Absorption vs month . So here i should get the ACTUAL_ABSORPTION with respect to the months. But am getting whole sum value here in stead of the individual value.

Please let me know where am missing.

Thanks,

Mahasweta