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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

count conditional to sum results

Hi,

Im trying to count customers based on a series of sum = to or -= results. I'm using the set expression below but it returns 'error in set modifier'. Any suggestions on what Im doing wrong, or a better way to achieve this.

Thanks in advance

Grant

=If( vFundTypePlayable = '1',
(COUNT(
{$<
[SUMMARY_DATE] = { ">=$(vStartDate)<=$(vEndDate)"}
, sum({$<PNL_REAL={'0'}>})
, sum({$<PNL_RELEASED_BONUS={'0'}>})
, sum({$<PNL_PLAYABLE_BONUS-={'0'}>})
>}
DISTINCT [PARTY_ID])
)
)

11 Replies
Not applicable
Author

because its grouped by party id it becomes unique so Distinct isn't required, I was able to confirm this in the sub query results.

Your suggestion above returns a "error in set modifier ad hoc element list. ',' or ')' expected", with the following underlined.

"}>}PNL_REAL)=0"}>


ramoncova06
Partner - Specialist III
Partner - Specialist III

I don't see where the error could be since all of the brackets are closed properly