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

How to calculate a percentage of a text Value ?

Hi experts,

How to calculate a percentage of a text Value ?

Example:

I need to calculate in the column Toto the percentage of value that contains 'Toto' ?

what do i use ? Textcount('Toto')/ TOTAL(Toto) ?

Thank you

Regards

Ali

1 Solution

Accepted Solutions
sunny_talwar

Check the attached

Capture.PNG

View solution in original post

10 Replies
Anil_Babu_Samineni

How to calculate a percentage of a text Value ?

I am not understading?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
sam_grounds
Contributor III
Contributor III

Hi,

Simply use that value in set analysis...

Count({$<FieldContainingToto={'*Toto*'}>}MainIDField) / Count({$<FieldContainingToto=>}MainIDField)


You'll need to update the field names from above, but that should work.


Sam


prieper
Master II
Master II

COUNT(IF (Toto = 'Toto', Toto) / COUNT(TOTAL IF (Toto = 'Toto', Toto)

sunny_talwar

May be this

Count({<FieldName = {'*ToTo*'}>}FieldName)/Count(FieldName)

bouderbc
Creator
Creator
Author

it doesn't work for me , do u have a sample for this (other example) ?

Thank you

bouderbc
Creator
Creator
Author

it doesn't work for me , do u have a sample for this (other example) ?

Thank you

sunny_talwar

We probably can get across one, would you be able to share some raw data?

bouderbc
Creator
Creator
Author

Hi Sunny,

in this example , i want to calculate :

The Percentage of KO

The Percentage of OK

The Percentage of OK by customer

The Percentage of KO by customer

Sample-data-2.PNG

sunny_talwar

Check the attached

Capture.PNG