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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Set Analysis expression (nested?) help

I need a sum of sales from associates whose SalesType is 'OutsideSales' **AND** if they have more than 10 rows of data.

    SELECT

         SUM(Sales)

    FROM table

    WHERE SalesType = 'OutsideSales'

    HAVING COUNT(*) > 10

I have tried something like this...Not working:

Sum({<SalesAssociate = {'$(=Count({<SalesType = {'OutsideSales'}>} SalesId) > 0)'}>}Sales)

1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Just in case you're trying this in the script: set analysis cannot be used in the script.

But if you're trying to use the expression you posted in a chart then try this one:

Sum({<SalesAssociate = {"=Count({<SalesType = {'OutsideSales'}>} SalesId) > 10"}>}Sales)


talk is cheap, supply exceeds demand

View solution in original post

2 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Just in case you're trying this in the script: set analysis cannot be used in the script.

But if you're trying to use the expression you posted in a chart then try this one:

Sum({<SalesAssociate = {"=Count({<SalesType = {'OutsideSales'}>} SalesId) > 10"}>}Sales)


talk is cheap, supply exceeds demand
Anonymous
Not applicable
Author

Works great.  Thank you!