Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikView forum consolidation is complete. Labels are now required. LEARN ABOUT LABELS
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
Partner

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
Partner

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

nesonica
Contributor III
Contributor III

Thanks so much! 😄 That worked