Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
how to use Sum with First sortedvalue
I have to get sum of balance .. but the values is showing wrong with below expression.
=
sum(if (
isnull(FirstSortedValue([Balance], ssDate))
,
0
,
FirstSortedValue([Balance], ssDate)
)
)
Can anyone advice with correct syntax
Thanks
Chanty
=rangesum(FirstSortedValue([Balance], ssDate),0)
thanks gwassenaar. but it is also not working chk below image
as closing balance should not be in Negative . and opening balance is showing "0" only
How To Ask Questions The Smart Way
chanty,
I didn't find your calculation value. Can you post full expression. Sum(sales) similar that where is your SUM calculation field.
Hi anil,
this is for Closing balance : working fine
if
(
isnull(FirstSortedValue([Balance], TBDate))
,
sum(0) + Sum (Debit) - Sum (Credit)
,
FirstSortedValue([Balance], ssDate) + Sum (Debit) - Sum (Credit)
)
this is for openg bal :Not working
=
sum(if (
isnull(FirstSortedValue([Balance], ssDate))
,
0
,
FirstSortedValue([Balance], ssDate)
)
)
Not sure, but did you try Gysbert's solution with a DISTINCT?
=RangeSum(FirstSortedValue(DISTINCT [Balance], ssDate),0)
it is givng error sunny not allowing to use Distinct. chk below image for your ref
Expression Editor doesn't understand the syntax, try clicking ok and see if the result comes out as desired. This was an issue in the older version of QlikView.
yes sunny even though result is wrong it self.
it is not caluclating the sum and the closing balance is showing negative.