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

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Conditional Formatting in a Text Object

First time submission.

I want to format the number in a text box to read 'LTL Revenue $12,453.60'. Using the script below returns the result as 'LTL Revenue 12453.60'. I'm open for suggestions.

Thanks

Vic

=

'LTL Revenue ' & Num(sum(if(OriginTerminal<950, RevenueBeforeSurcharge$,'$#.##0; ($#,##0)'

)))





1 Solution

Accepted Solutions
prieper
Master II
Master II

Agree with Mike, parenthesis are wrong. Try with

= 'LTL Revenue ' & Num(sum(if(OriginTerminal<950, RevenueBeforeSurcharge)), '$#,##0')


Thus in the above code it will not show anything, if "OriginTerminal < 950

HTH
Peter

View solution in original post

4 Replies
mike_garcia
Specialist
Specialist

Hello,

I can see that there are a few parenthesis missing. It might sound silly but maybe that's the issue.

Mike



Miguel García
Qlik Expert, Author and Trainer
Not applicable
Author

Hi Vic,

It seems that your thousand separator is not the same in both parts of the format string, but that will not so much difference.

Could you not use the money() function instead of num?

regards Jan

prieper
Master II
Master II

Agree with Mike, parenthesis are wrong. Try with

= 'LTL Revenue ' & Num(sum(if(OriginTerminal<950, RevenueBeforeSurcharge)), '$#,##0')


Thus in the above code it will not show anything, if "OriginTerminal < 950

HTH
Peter

Not applicable
Author

Thanks everyone for the feedback. Mike, you and Peter were correct, it was in the location of the parenthesis. I have the results I was looking for. Smile

Vic