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

Announcements
Talend Cloud AWS EU Scheduled Outage: Starting Tues 26 May 21:00 CEST with expected completion Wed 27 May 01:00 CEST
cancel
Showing results for 
Search instead for 
Did you mean: 
nigel987
Creator II
Creator II

Count users with at least one publication - improve expression

Hi,

I have a big dataset with 3,5 Mio Users and 50 Mio Publications.

I am using the expression

=Count({$<UserID = {"=Count(PublicationID) > 0"}>} UserID)

to count the number of users having at least one publication. I already removed the distinct from the expression, but the calcualtion is still really slow.

Does anyone have an idea if there is a better (less performance-consuming) way to write this expression?

Many thanks in advance,

Nigel



Maybe I should add the following: when I use a straight table (chart) for the calculation, it takes long/crashes.

When I use a simple textbox, it works fine.

Labels (1)
2 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Try Count({$<PublicationID={"*"}>} UserID)

If that still gives performance issues then perhaps you can add a flag field in the script that indicates for each userid if there's a publication for that id.


talk is cheap, supply exceeds demand
nigel987
Creator II
Creator II
Author

Hi Gysbert,

thanks for your response!

I tried it and it seems to be faster. I've just one more question: how would I search for those users, who do not have a publication at all?

KR,Nigel