Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
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.

2 Replies
Gysbert_Wassenaar

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