Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to sum with letters included?

Hallo everyone,

I am quite new to QlikView and I wonder if someone could help me with the following issue:

I would like to sum a colum which is easy. But now I have the problem that letters are in that same column. If I insert a sum formula the letters vanish to "0" what they shouldn't do. I need them there but not to be count.

Can anyone help, please?

Thank you very much in advance!

17 Replies
Anil_Babu_Samineni

May be this?

Sum({<[Vanish Letter Field Name] -= {'','0'}>}Measure)

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
sunny_talwar

You are doing this in the script? What exactly are you doing?

vishsaggi
Champion III
Champion III

Can you share some sample values you have in that field and your sum expression you are trying?

Colin-Albert

You can use the Isnum() function to test the data before summing though this is not the most efficient way if you have a large set of data.

sum(if(isnum(Measure), Measure))

Or use the expressions in the load script to load the numeric values into another field for summing.

load

...

Measure,

if(isnum(Measure), Measure) as MeasureNum,

...



and then sum(MeasureNum)

Anonymous
Not applicable
Author

Thank you very much guys for the fast responses.

I am trying to solve something like this:

   

15.08.2017
3,00
1,00
0,50
abc
8,00
4,00
6,00
7,00
2,00
9,00
5,00

At the end (or beginning doesn't matter) I would like to have the sum (45,5). But when I sum in qlikview my "abc" vanishes.

And I am not doing this in the script but in a table.

Thank you so much!

Colin-Albert

Untick "Suppress Zero-Values" on the Presentation sheet of the chart properties.

measure.JPG

Suppr.JPG

Anonymous
Not applicable
Author

Thank you. But still I want the in your example said e.g. "qwerty" to be written there and not the null.

sunny_talwar

Try this

=If(Dimensionality() = 0, Sum([15.08.2017]), If(IsText([15.08.2017]), [15.08.2017], Sum([15.08.2017])))

Capture.PNG

vishsaggi
Champion III
Champion III

Sunny can this be written like this too? Any calc time between two expessions?

=If(Dimensionality() = 0, Sum([15.08.2017]), If(IsText([15.08.2017]), [15.08.2017], Sum([15.08.2017])))


AND


=If(Dimensionality() = 0, Sum([15.08.2017]), If(IsNum([15.08.2017]), Sum([15.08.2017]), [15.08.2017]))


Is this negligible. Just wondering.