Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Using Raw Data: No Value referenced with symbol

Hi,

I have got some raw data in Excel looking like:

Data1Data2

1

-
-8
11-
78
-1

So if there is no value, I do have a "-" in the cell.

However, I would like to leave the data untouched.

How can I define that these cells are skipped when calculating stuff like averages or simple summation in Qlikview?

Many thanks in advance

1 Solution

Accepted Solutions
sunny_talwar

Seems to be working, what is the issue?

Capture.PNG

Script:

Table:

LOAD Companyname,

    Year,

    Data1,

    Data2,

    RangeSum(Data1, Data2) as Data3

FROM

[https://community.qlik.com/thread/211251]

(html, codepage is 1252, embedded labels, table is @6);

View solution in original post

28 Replies
sunny_talwar

May be this:

Avg({<Data1 -= {'-'}>}Data1)


Note the small negative sign in red before the equal sign

swuehl
MVP
MVP

So these records show a character '-'? Or is this your representation of NULL?

You probably won't need to do anything.

Sum() will only sum up numeric values. Also Avg() should only operate on the numeric values.

Not applicable
Author

Thanks, seems to work.

Can I define this overall in the script?

Did some x+z as y loading in the script, which doesn´t work with the "-" values...

Not applicable
Author

See above, that doesn´t work with predefined formulas.

sunny_talwar

Not sure I understand, can you provide a sample of what you are doing?

swuehl
MVP
MVP

Try

Rangesum(x,z) as y

Not applicable
Author

CompanynameData1Data2
A

1

-
A-8
B11-
B78
C-1
C7-

So in the loadscript I have defined

Rangesum(Data1,Data2) as Data3


Depending on the chosen Company I want to illustrate the result in a table.


Using SUM({<Companyname>}[Data3]) does not get me the right result.

What is the right function?

sunny_talwar

What is the number you are expecting to see from the above sample?

swuehl
MVP
MVP

Is this what you get when executing the LOAD?

Companyname Data1 Data2 Data3
A-88
A1-1
B7815
B11-11
C-11
C7-7

This is when I use Companyname as dimension in a chart and


SUM({<Companyname>}[Data3])

as expression:

Companyname SUM({<Companyname>}[Data3])
43
A9
B26
C8

Seems ok to me, or please advise what you expect instead.

Also, as I mentioned above, Sum() and Avg() functions don't seem to worry about your '-' values:

Companyname SUM({<Companyname>}[Data3]) Sum(Data1) Avg(Data1)
43 26 6,5
A911
B26189
C877