Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
nesonica
Contributor III
Contributor III

Counting Field - Typing Error

Hi guys,

this formula seems not to work and I do not find my error. I was trying to count those orders where there is only one order position. Can you help me? 🙂 Thanks in advance!

Count({<PeriodMath={'>=$(vMinPeriodYear2)<=$(vMaxPeriod2)'},Sum(Count(POSITIONNUMBER)={1})>}ORDERNUMBER)

Labels (3)
1 Solution

Accepted Solutions
jaibau1993
Partner - Creator III
Partner - Creator III

Hi!

In set analysis you have to  write sets for fields in your data model. You can not use

Sum(Count(POSITIONNUMBER)={1}

because "Sum(Count(POSITIONNUMBER)" is not a field. You may use something like

Count({<PeriodMath={'>=$(vMinPeriodYear2)<=$(vMaxPeriod2)'}, ORDERNUMBER = {"=Count(POSITIONNUMBER) = 1"})>} ORDERNUMBER)

Hope it helps!

Jaime.

View solution in original post

2 Replies
jaibau1993
Partner - Creator III
Partner - Creator III

Hi!

In set analysis you have to  write sets for fields in your data model. You can not use

Sum(Count(POSITIONNUMBER)={1}

because "Sum(Count(POSITIONNUMBER)" is not a field. You may use something like

Count({<PeriodMath={'>=$(vMinPeriodYear2)<=$(vMaxPeriod2)'}, ORDERNUMBER = {"=Count(POSITIONNUMBER) = 1"})>} ORDERNUMBER)

Hope it helps!

Jaime.

nesonica
Contributor III
Contributor III
Author

Thanks so much! 😄 That worked