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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
tellmalaika17
Contributor II
Contributor II

Error message

Hi,

While using below expression, getting an error as "error in expression ')' expected".

=num(sum({$<month={$(=max(month))}>}
Sales/1000000)/ num (right ($(=max(month)),2))
//*12,'#,##0')

The above expression gives error only when there is no data. I want it to display 'No data to display' or show '0' when there is no data but unable to change this in error message.

Appreciate any help in this regard.

Thanks,

11 Replies
Peter_Cammaert
Partner - Champion III
Partner - Champion III

If your data is complete (months for all facts), then month shouldn't result in '-' but in a lot of different values. Max(Month) will pick the highest month even if you haven't explicitly selected any data (=everything is selected), on condition that either Month is numerical to begin with or month is a dual value with a valid numerical component. Otherwise Max() will return NULL because it is unable to enumerate month values and decide which one is the highest...

Are you sure that month isn't filled with text-only values?

rugveddhuri
Contributor II
Contributor II

Hi,
Can you try this?

=Num(Sum({$<month={$(=Max(month))}>}

Sales/1000000)/ Num (Right ($(=If(IsNum(Max(month)),Max(month),1)),2))

*12,'#,##0')