Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a table called
'FBData', which is from a data source called FBData.csv
The columns in the table include 'Likes' Shares' Comments'
I have an expression in a table that is =sum(likes + shares + comments)
Sometimes, these fields are blank in the data, causing the expression to return a value of 0 (zero). For example, likes=100, shares are blank and comments =50, the expression returns 0 due to the blank.
How can this be fixed?
Maybe you could try
Sum(RangeSum(likes, shares, comments))hope this helps
regards
Marco
Had marked this as correct as I thought I had a solution, I was wrong
Hi Evan,
You can use the NullAsValue function when loading the data to replace all your Null values with 0. This shows you how: https://help.qlik.com/en-US/qlikview/November2017/Subsystems/Client/Content/Scripting/ScriptRegularS...
I hope that helps!
Serina
When applicable please mark the appropriate replies as CORRECT. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads as HELPFUL if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads as HELPFUL if you feel additional info is useful to others.
In script before you load the table copy following two lines:
NullAsValue *;
SET NullValue = 0;
Load
share,
likes,
comments
From Yourtable
hope this helps
Serina -
Where does this go in my script? I tried loading directly before my load statement and did not correct the situation.
Thanks,
Evan
Maybe you could try
Sum(RangeSum(likes, shares, comments))hope this helps
regards
Marco