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: 
CSmith
Contributor III
Contributor III

Count a distinct value within the same colu,m

I have a column in my report, Tracking Status, that can have a value of Active, Pending, Canceled, or Rejected. Is there a way to, for example, only count the Active statuses?

CSmith_1-1742749057152.png

 

I have tried creating a measure with the following formulas, none of them worked.

aggr(Count(TRACKING_STATUS), TRACKING_STATUS = 'Active')

If(Count(distinct TRACKING_STATUS = 'ACTIVE')=1,TRACKING_STATUS,1)

Count(IF(TRACKING_STATUS,'Active'))

Count(Distinct TRACKING_STATUS='Active')

Labels (1)
1 Solution

Accepted Solutions
Chanty4u
MVP
MVP

Try this.Sum(If(TRACKING_STATUS='Active', 1, 0))

 

View solution in original post

3 Replies
ramchalla
Creator II
Creator II

Hi,

Try the below formula

Count({<[Tracking Status] = {'Active'}>} [Tracking Status])

Chanty4u
MVP
MVP

Try this.Sum(If(TRACKING_STATUS='Active', 1, 0))

 

CSmith
Contributor III
Contributor III
Author

Thank you Chanty4u/MVP. This worked perfectly!!