Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

percentage of text field

Hi everyone! First of all, thank you for taking the time to try and help me.  I am very new to Qlikview, still trying to figure it out.  I need to create a line chart that looks at how long a period of time is.  In my expression, I have written:

= sum(count(fieldA)) / sum(count(TOTAL fieldA))

But this expression requires too much memory or something along those lines.  Does anyone have any suggestions or helpful tips?

Thank you again!

5 Replies
sunny_talwar

I think you need to provide information. The problem is that you cannot use double aggregation like Sum(Count()) without Aggr function. May be you just need this

=Count(fieldA)/Count(TOTAL fieldA)

but you post doesn't give much information as to what is needed, so it would be helpful if you either provide a sample or provide more information on what you are trying to do

Best,

Sunny

Anonymous
Not applicable
Author

Hi Sunny! Thank you for your help! So I have field that lists countries and another that lists months of the year 2015.  I want to know what percentage of a specific country happens in each month. Please see below for an example:

country   Jan    Feb    March   April   May    June   July    August   Sept   Nov  Dec        TIOTAL

UK           10     5          30         15       8        12      47         9           14        7     3              160

Spain        40     18       20          7        2         11       44      28           9          14   0              193

I would like to know what is the percentage of the UK in March (compared only to the UK).  So the answer in this case would be about 19%.

Thank you!

sunny_talwar

Try this:

Count(FieldA)/Count(TOTAL <country> FieldA)

Anonymous
Not applicable
Author

thank you! this works perfectly!

sunny_talwar

Awesome I am glad it did. Please close this thread by marking correct and helpful responses.

Qlik Community Tip: Marking Replies as Correct or Helpful

Best,

Sunny