Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

writing an "AND" statement in qlikview

Hi guys,

Please I am trying to write a statement in qlikview as follows:

If month = 'Apr' AND month = 'May' then display these period is spring. But I don't know how to write such  a statement in qlikview. Please any help?

Thanks

29 Replies
sunny_talwar

This:

=Pick(RangeSum(Avg({<ID = p({<ElectricityTypeID = {53}>})*p({<ElectricityTypeID = {54}>})>} 1), Avg({1}1)), 'I don''t like this', 'I love this')

Not applicable
Author

Sunny,

In plain English what is these expression saying?

sunny_talwar

Lets break it down into pieces


1) Avg({<ID = p({<ElectricityTypeID = {53}>})*p({<ElectricityTypeID = {54}>})>} 1) will equal to 1 when a particular ID has both 53 and 54 as ElectricityTypeID. Otherwise this will be Null()


2) Avg({1}1) will always be 1 regardless of anything you are seeing


3) RangeSum(1, 2) will give 2 for those rows where ID has both 53 and 54 and 1 for those where the condition isn't met


4) Pick(3, ...) When number 3 point returns 1 -> I don't like it, When it returns 2 -> I love it

Does it make sense now?

Not applicable
Author

Yes Sunny its clear now thanks alot.

Please I am also trying to make a text blink by writing these expression If(Odd(Second(Now())),'Clik here'

but it is not working I don't know what I am doing wrong.

sunny_talwar

Are you using QV12? There is an issue with Now() function in QV12

Not applicable
Author

Yes I am using QV(12)

sunny_talwar

Check here -> Bug in QV12? Now() function is not continuously updating

Although nobody responded, I found that this worked in QV 11.20, but not in QV12

sunny_talwar

If you got what you wanted, I would request you to spend some time marking correct and helpful answers as this thread might prove helpful for another person and instead of looking through the whole application, they might benefit more by looking at a correct and helpful answer.

Qlik Community Tip: Marking Replies as Correct or Helpful

Best,

Sunny

Not applicable
Author

Thanks Sunny,

I have done that, I really appreciate your help.

Regards,Simon

sunny_talwar

I don't mind if you put Assumed Answer, but please don't mark you question as a correct answer. I feel there are many other responses which can qualify for correct and helpful answers. It might seem like a difficult task, but I really request you to do this to make this community a better place.

Thanks