Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
JustinM
Contributor III
Contributor III

Distinct count only non-blank cells

Hi

I'm trying to distinct count a column of cells but ignore the cells with blank values.

I've tried this

Count({<sRefNo = {"=Sum(sRefNo) = 0"}>}DISTINCT sRefNo)

which works to count but it includes the blank in the answer

The below attempt says I'm missing a ")"

Count(if(not isnull(sRefNo),distinct sRefNo))

Please help

1 Solution

Accepted Solutions
Anil_Babu_Samineni

Perhaps this for second one?

Count(distinct if(not isnull(sRefNo), distinct sRefNo))

Or

Count({<sRefNo={"=Len(sRefNo)>=0"}>} sRefNo)

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)

View solution in original post

2 Replies
Anil_Babu_Samineni

Perhaps this for second one?

Count(distinct if(not isnull(sRefNo), distinct sRefNo))

Or

Count({<sRefNo={"=Len(sRefNo)>=0"}>} sRefNo)

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
JustinM
Contributor III
Contributor III
Author

Much appreciated. It worked. The only change I made to yours was the "=Len(sRefNo)>=0" changed to "=Len(sRefNo)>0"