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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Count if

Hi Experts,

I'm a QlikView Newbie and I need your help.

I have a Straight Table with all Sales Orders and for each line I have an expression with the

delay shipment days.

How Can I count how many Sales Order Lines are in delay ?

I tried

Count([Delay Days] > '0')         -> Doesn't work

=Count({$<[Delay Days]>0>)   -> Doesn't work

Where Delay Days is an Expression belowing Sales Straight Table.

Thanks a lot.

Labels (1)
1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

=count({$<[Delay Days]={'>0'} > } [Sales Order Line]) 


talk is cheap, supply exceeds demand

View solution in original post

11 Replies
deepakk
Partner - Specialist III
Partner - Specialist III

hi,

Try this code.

if(count([Delay Days]>0,1)

Deepak

Not applicable
Author

Maybe there is a syntax error because the comma between 0 and 1 is underlined red.

M4rk0

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

=count({$<[Delay Days]={'>0'} > } [Sales Order Line]) 


talk is cheap, supply exceeds demand
Not applicable
Author

How Can I identify the Sales Order Line ?

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

No idea, it's your data model not mine. If you say you want to count the sales order lines with a delay > 0 then I assume your data model has an entity sales order line.


talk is cheap, supply exceeds demand
Not applicable
Author

Correct !! 🙂 But seems that works well with the Dimensions but doesn't works with Expressions. The formula gives me tha total Sales Lines. 😞

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

How do you calculate delay days? Can you share the qvw document you're working on?


talk is cheap, supply exceeds demand
Not applicable
Author

I have two dates

Working days and Solar Days

Delay Working Days

If([Confirmation Date]<[Creation Date],NetWorkDays([Confirmation Date], [Creation Date]),'-' & NetWorkDays([Creation Date],[Confirmation Date]))

Delay Solar Days

=[Creation Date] - [Confirmation Date]

I can't send you the file because is gather information direct from SQL Server.

Not applicable
Author

Comments in English,

thanks