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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
emilyrabbit
Creator
Creator

count with conditional group by

Hi buddy, I have below request, no idea how to create the expression. Thanks for any suggestion.

I have a table: [Year Month],[Sales Admin],[Order]

emilyrabbit_0-1761269805517.png

I want to calculate the active user ( the user should have >1 order) number in each month.The example excel is attached.

The final chart what I want.

emilyrabbit_1-1761270174550.png

 

I want to write the expression in the chart , not in the loading script.

=count({<aggr((count(distinct[Order]),[Year Month],[Sales Admin])>1)>}distinct[Sales Admin])

@hanna_choi 

Labels (2)
14 Replies
hanna_choi
Partner - Creator II
Partner - Creator II

Hi @emilyrabbit 

Would you like to change the script like below?

****************************

Data_Table:
Load
Orders&Date as Key,
*
;
LOAD
Text(Date("Order Header Creation Date", 'YYYYMM')) as Date,
"Order Document Number" as Orders,
"Order Created By Rep" as Rep
FROM ~~~~
where _KEY_Unit_DWHK='2'
;


TEMP3:
NoConcatenate
Load
Key,
Count(DISTINCT Orders) as COUNTNUM
Resident Data_Table
Group BY Key
;

emilyrabbit
Creator
Creator
Author

emilyrabbit_1-1761550146332.png

 

emilyrabbit_0-1761550121246.png

 

hanna_choi
Partner - Creator II
Partner - Creator II

Hi @emilyrabbit 

The error occurred in the TEMP4 table, and the key field is lowercase.

In the TEMP3 table, the first letter of the Key field is uppercase.

emilyrabbit
Creator
Creator
Author

HI @hanna_choi   maybe a stupid question, I don't understand the yellow part. Thanks for any information from your side.

emilyrabbit_0-1761572883899.png

 

hanna_choi
Partner - Creator II
Partner - Creator II

Hi @emilyrabbit 

I had mistake.
The expression is wrong.

hanna_choi_0-1761610206019.png