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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set analyses challenge

Hi,

I;m having problems with a seamingly simple set analyses.

TABLE: INVOICES. (Invoice_ID, Relation_ID, Invoice_Date, 1 as Number of Invocies)

TABLE: CUSTOMER: (Relation_ID, 1 as Number of Invoices).

TABLE: DATE (Invoice_Date, Month, Year etc).

What I want is:

Sum ( Number of Relations   WHERE Number Of Invoices in selected time dimension = 1 ).

Ofcourse Number of invoices should be over the selected period in the timetable.

The formula should also work when building a graph displaying a yearmonth dimension.

(So we can see that the number of customers with just one invoice in a period, declines.)

Thanks!

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Try

=count({<Relation_ID = {"=sum([Number of Invoices])=1"}>} distinct Relation_ID)

View solution in original post

4 Replies
jvitantonio
Specialist III
Specialist III

sum( {$<Relation_ID = {1}>} NumofRelations )

Not applicable
Author

That doesn't seem right. That would select only Relation_ID = {1}. Which is only 1 relation.

I want the number of relations that only have 1 invoice in the selected period.

swuehl
MVP
MVP

Try

=count({<Relation_ID = {"=sum([Number of Invoices])=1"}>} distinct Relation_ID)

Not applicable
Author

Yep! Worked. Thanks a lot!