Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Count the text field in qlik

I have a table where I have Column field %Accuracy.

The values are coming as below, I need to calculate the total of ACCURATE in the Summary (Top of the Column)

  

% Accuracy
-
ACCURATE
ACCURATE
ACCURATE
ACCURATE
ACCURATE
ACCURATE
ACCURATE
ACCURATE
ACCURATE
ACCURATE
ACCURATE
ACCURATE
ACCURATE
ACCURATE
ACCURATE
ACCURATE
ACCURATE
ACCURATE
ACCURATE
ACCURATE
ACCURATE

My expression is: =Only([BSMP13 Accurate/Non Accurate])

16 Replies
sunny_talwar

What is the expected output here? 100%? Since everything is ACCURATE?

Not applicable
Author

Yes. That's correct.

sunny_talwar

May be try this

If(Dimensionality() = 0, Num(Count({<[BSMP13 Accurate/Non Accurate] = {'ACCURATE'}>}[BSMP13 Accurate/Non Accurate])/Count([BSMP13 Accurate/Non Accurate]), '##%'), Only([BSMP13 Accurate/Non Accurate]))

Not applicable
Author

If all 'Accurate' is should show 100%, if some values are "Not Accurate" it should calculate accordingly.

sunny_talwar

Try this and it should work, I think

If(Dimensionality() = 0, Num(Count({<[BSMP13 Accurate/Non Accurate] = {'ACCURATE'}>}[BSMP13 Accurate/Non Accurate])/Count([BSMP13 Accurate/Non Accurate]), '##%'), Only([BSMP13 Accurate/Non Accurate]))

Not applicable
Author

It is working but in some of the months all values are accurate but it shows 94%.

sunny_talwar

Do you have a calculated dimension? Would you be able to share a screenshot to check this out?

Not applicable
Author

Yes. I can show you the issue.

Accurate.JPG

sunny_talwar

Difficult to say why it is doing that? Calculated dimension? Can you share a sample?