Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Error in Expression: ')' expected

Greetings,

I'm trying a simple sum but have 2 different formats to return the data, dependant of the data which is selected to be shown. The elements are set using a variables:

vDisplayFormat (This should set the formatting to use)

  • Cost      R # ##0;R # ##0
  • Time      ##0

vDisplay (This refers to the field where the data resides)

  • Cost      Total
  • Time      No. Hrs Worked

Expression I'm using is:

=NUM(SUM($(vDisplay)),vDisplayFormat)

This works for the Cost formatting, but the Time formatting returns the Error in Expression: ')' expected

The idea is to return the:

  1. SUM of Total in R # ##0;R # ##0 format
  2. SUM of No. Hrs Worked in ##0 format

Any ideas?

Message was edited by: Chris Evans

1 Solution

Accepted Solutions
sasiparupudi1
Master III
Master III

your No. Hrs Worked should be [No. Hrs Worked] or "No. Hrs Worked"

View solution in original post

10 Replies
MarcoWedel

please post sample app

thanks

regards

Marco

nithin_miryala
Creator
Creator

try $(vDisplayFormat)

Not applicable
Author

Hi, I tried that before using the forum, doesn't work.

Not applicable
Author

Sample app is uploaded

sasiparupudi1
Master III
Master III

your No. Hrs Worked should be [No. Hrs Worked] or "No. Hrs Worked"

Not applicable
Author

try like this

=NUM(SUM($(vDisplay)),'$(vDisplayFormat)')

Not applicable
Author

Thanks ... simple solution

Not applicable
Author

This is the answer, just need to adjust the variable action to one of the above and it will work fine

Not applicable
Author

Didn't work ... but we got to the solution