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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
madhuqliklondon
Creator II
Creator II

Count orders only with discount

Hi All,

I want to Count orders with discount only.

I have field names [Order number] ,[Sales amount] and [Discount amount].

Thanks in advance.

1 Solution

Accepted Solutions
Anonymous
Not applicable

Hi,


Use the below code.


Count(Distinct If([Discount Amount] > 0 , [Order Number]))



Thanks,

Venkata Sreekanth

View solution in original post

4 Replies
lironbaram
Partner - Master III
Partner - Master III

hi you can do it like this

count({<[Discount amount]={">0"}>}distinct [Order number])

madhuqliklondon
Creator II
Creator II
Author

Hi,

I am counting orders with count(DISTINCT [Order number]) and orders with discount  with count({<[Discount amount]={">0"}>}distinct [Order number])  , for some reason I have same count of number of orders in both .

Anonymous
Not applicable

Hi,


Use the below code.


Count(Distinct If([Discount Amount] > 0 , [Order Number]))



Thanks,

Venkata Sreekanth

madhuqliklondon
Creator II
Creator II
Author

Thank you Sreekanth