Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Highlighted
c_latham
New Contributor III

Set Analysis

Hi All,

I have the current expression to show orders per day:

Count([%Order ID]) / Count(Distinct O_Headers.ORDERDATE)

Which returns the value 81

I need to exclude any selections so that when someone selects an order ID (or any other field for that matter) that this value does not change.

I tried: =Count({$<[%Order ID]=>}[%Order ID]) / Count(Distinct{$<OHeaders.ORDERDATE=>}[%Order ID])

to remove the Order ID selection but the number drops to 76 (No Order ID has been selected at any point).

Can someone please point me in the right direction?

Thanks!

1 Solution

Accepted Solutions
Highlighted
Chanty4u
Esteemed Contributor III

Re: Set Analysis

try this

Count({1}[%Order ID]) / Count(Distinct {1}O_Headers.ORDERDATE)

View solution in original post

4 Replies
Highlighted
pascos88
Contributor II

Re: Set Analysis

Hi,

try with this

Count({1<[%Order ID]=>}[%Order ID]) / Count(Distinct{1<OHeaders.ORDERDATE=>}[%Order ID])



Highlighted
Chanty4u
Esteemed Contributor III

Re: Set Analysis

try this

Count({1}[%Order ID]) / Count(Distinct {1}O_Headers.ORDERDATE)

View solution in original post

Highlighted
c_latham
New Contributor III

Re: Set Analysis

Thank you very much!! This worked

Highlighted
Chanty4u
Esteemed Contributor III

Re: Set Analysis

Nice have a nice day