Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
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

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

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!