Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

count with and condition in qlik view expression

my requirement is count the number of  loads  which are matching [Scheduled date] = [Actual Date] and [Actual  Time] = [Schedule Time]

i tried like this

=count( {$<[Scheduled Date] = [Actual  Date], [Scheduled Time] = [Actual  Time] >} [Load])

how to get count

thank you

1 Solution

Accepted Solutions
swuehl
MVP
MVP

If you need a record based comparison:

=count( If( [Scheduled Date] = [Actual  Date] and [Scheduled Time] = [Actual  Time] , [Load]))

Or maybe, if LOAD is the Key for the dates, but not a primary key in your tables:

=count( {$<Load = {"=[Scheduled Date] = [Actual  Date] and [Scheduled Time] = [Actual  Time]"} >} [Load])

View solution in original post

2 Replies
swuehl
MVP
MVP

If you need a record based comparison:

=count( If( [Scheduled Date] = [Actual  Date] and [Scheduled Time] = [Actual  Time] , [Load]))

Or maybe, if LOAD is the Key for the dates, but not a primary key in your tables:

=count( {$<Load = {"=[Scheduled Date] = [Actual  Date] and [Scheduled Time] = [Actual  Time]"} >} [Load])

stabben23
Partner - Master
Partner - Master

Hi,

fist step would be to put date and time together to one filed

[Actual Date] & [Actual Time] as ActualTimestamp

[Scheduled Date] & [Scheduled Time] as ScheduledTimestamp

Make sure that both this New Field have the same timpstamp formate.

How do you want to present this? On a row level or as a total?

Give us some exampledata.