I have a table which contains matters, claimants and reserves. Each matter may have more than one claimant, and each claimant should have a reserve, but they aren't always completed for various reasons. In my LOAD script, I want to produce a table of reserves at matter level, so summing up the reserves for all claimants on each matter. However I really need to be able to distinguish between matters where a zero has been completed for the reserve, and those where it has just not been completed at all (i.e. the reserve is NULL).
I usually do this in SQL but have recently started using Qlik and can't find the answer anywhere the forums. In SQL I would use this syntax:
isnull(convert(varchar(50),cast(sum([Reserve]) as money),-1),'')
So if no reserves have been completed on any given matter, it comes out as blank, whereas if one or more zeros have been completed, it comes out as zero. In qlik even if all reserves on a matter are NULL, the SUM still seems to come out as zero rather than NULL. I have tried first converting the NULLs into 'Missing' but these still seem to add up to zero.
If each claimant can have only one reserve then you can try only(reserve) as expression since there won't be a need to sum the reserve values. In a straight table you can set the Total Mode of the expression to Sum of Rows so you will get a total.