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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Daryn
Creator
Creator

Count if with < *error*

Hi all, 

I hope you are all well and thanks in advance for reading and hopefully assisting with my query.

I am trying to use the below;

count ({< [WADAT_IST] < [WADAT], LFART = '{XLR, XLS}' >} VBELN ) / COUNT (VBELN)

In a bar chart. WADAT and WADAT_IST are two date fields. I want to compare them (the above would be deemed 'early' as it was issued before planned so using the < operator. But it wont allow it, giving me an 'Error in expression'. It will only allow =

The LFART is a type of deliver I am filtering for and then VBELN is document. These are all standard SAP fields.

Why is this please and what should I have as the expression?

I will then also have two others (hopefully) using = (for on time) and > for late.

I hope that makes sense.

Kind regards,

Daryn

Labels (1)
1 Solution

Accepted Solutions
MayilVahanan

Hi

MayilVahanan_0-1653303479389.png

 

[WADAT_IST] = {"=[WADAT_IST] < [WADAT]"}

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.

View solution in original post

7 Replies
MayilVahanan

HI

Try like below

count ({< [WADAT_IST] {"=[WADAT_IST] < [WADAT]"}, LFART = '{XLR, XLS}' >} VBELN ) / COUNT (VBELN)

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Daryn
Creator
Creator
Author

Hi Mayil,

Many thanks for replying.

Unfortunately still shows as an error.

Daryn_0-1653300131147.png

 

MayilVahanan

Hi

MayilVahanan_0-1653301995991.png

Try like below

LFART ={'XLR', 'XLS'}

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Daryn
Creator
Creator
Author

Thank you again Mayil, but still same error.

Daryn_0-1653302551020.png

 

MayilVahanan

Hi

MayilVahanan_0-1653303479389.png

 

[WADAT_IST] = {"=[WADAT_IST] < [WADAT]"}

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
MayilVahanan

Can u attach the sample file?

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Daryn
Creator
Creator
Author

Hi Mayil,

That fixed the error in the expression, thank you. 👍

Working as:

count ({< [WADAT_IST] = {"=[WADAT_IST] < [WADAT]"}, LFART ={'XLR', 'XLS'} >} VBELN ) / COUNT (VBELN)

 

Much appreciated.

Regards, Daryn