Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
shamitshah
Partner - Creator
Partner - Creator

Error in expression - Garbage after expression

Hi,

I am getting the following message "Garbage after expression:")"

By process of elimination I have narrowed the problem down to the expression:

=Num(RangeSum(Above(sum(SKH_Quantity), 0, rowno())))/2

The issue only arises when no selection of an item is made.

Any ideas?

Thanks

Shamit

1 Solution

Accepted Solutions
sunny_talwar

May be this:

=Num(

     RangeSum(

          Above(

               Sum(SKH_Quantity), 0, RowNo()

          )

     )/2

)

View solution in original post

8 Replies
sunny_talwar

May be this:

=Num(

     RangeSum(

          Above(

               Sum(SKH_Quantity), 0, RowNo()

          )

     )/2

)

sunny_talwar

This works when selection in item is made? Is this only part of the expression?

shamitshah
Partner - Creator
Partner - Creator
Author

Hi Sunny,

I  get results when I pick an item from the selection box, but when there is no selection the message pops up.

I tried your suggestion above but still having the same issue.

Thanks

Shamit

sunny_talwar

Would you be able to post snapshots of with and without selection?

shamitshah
Partner - Creator
Partner - Creator
Author

Hi Sunny,

These are the expression in the table:

Movement:  sum({<PeriodType={'Current'}>}SKH_Quantity)

M/E Balance: sum({<PeriodType={'Current'}>}SKH_Quantity)

Avg Stock: =Num(RangeSum(Above(sum(SKH_Quantity), 0, rowno())))/2

Stock Turn: =NUM(sum({<PeriodType={'Current'},SKH_Source={'SO'}>}SKH_Quantity)*-1)-sum({<PeriodType={'Current'},SKH_Reference={'RA*'}>}SKH_Quantity)/(num(RangeSum(Above(Sum(SKH_Quantity), 0, rowno())))/2)

SO:sum({<PeriodType={'Current'},SKH_Source={'SO'}>}SKH_Quantity)*-1

RA:=NUM(sum({<PeriodType={'Current'},SKH_Source={'SO'}>}SKH_Quantity)*-1)-num(sum({<PeriodType={'Current'},SKH_Reference={'RA*'}>}SKH_Quantity))

Without any selection:

Selection of an item:

Thanks

Shamit

sunny_talwar

You marked my above response as correct, is the issue resolved now?

shamitshah
Partner - Creator
Partner - Creator
Author

Yes, thanks Sunny.

Shamit

sunny_talwar

Awesome