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

Not Null values in calculation

Hi experts

I need to calculate a formula in QlikSense.  There is a date field "Actual finish". Some records show blank / space values for that field. These values should be ignored in this calculation. But the current formula is not working:

Sum( {<[Days]={">-3<1"}, [Year]={$(=max([Year]))},
len(trim([Actual finish]))>0>} [Count Order])

Any ideas how to fix this issue?

Best Regards

Tom

5 Replies
arulsettu
Master III
Master III

May be like this

if(len(trim([Actual finish]))>0,Sum( {<[Days]={">-3<1"}, [Year]={$(=max([Year]))}>} [Count Order]))

TomBond77
Creator III
Creator III
Author

many thanks, this works.

Now I only need to exclude those records with no "Actual finish" date from the result set. Can you please give me the code for the column "Actual finish"?

arulsettu
Master III
Master III

Can you share the sample output data set?

TomBond77
Creator III
Creator III
Author

I fixed it, but now I need to see the "Total" over that formula:

 

TomBond77_0-1627300378045.png

 

stevejoyce
Specialist II
Specialist II

@TomBond77 Use set analysis instead of if statement for this...

Sum( {<[Days]={">-3<1"}, [Year]={$(=max([Year]))}, 

[Actual finish] = {"=len(trim([Actual finish]))>0"}

>} [Count Order])

 

that will also aggregate up to your Total row.