Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
evansabres
Specialist
Specialist

Format as a Number

I have an expression

=NUM(SUM(transTOTALSALE),'#$,###.##')+ NUM(SUM({$<transTYPE={"RETURN"},}>}transQUANTITY * transBASEPRICE),'$#,###.##') - projREV

I want this result to be shown as a dollar amount. However, the result is just displaying as 33980 as opposed to $33,980.

Do I have the structure of the expression incorrect?

1 Solution

Accepted Solutions
krishnacbe
Partner - Specialist III
Partner - Specialist III

=NUM((SUM(transTOTALSALE)+ SUM({$<transTYPE={"RETURN"}>}transQUANTITY * transBASEPRICE )) - projREV,'#$,###.##')

View solution in original post

8 Replies
krishnacbe
Partner - Specialist III
Partner - Specialist III

Try below expression.

=NUM((SUM(transTOTALSALE)+ SUM({$<transTYPE={"RETURN"},}>}transQUANTITY * transBASEPRICE ) - projREV,,'#$,###.##')

evansabres
Specialist
Specialist
Author

When I enter this into the expression dialogue box, I get a message of 'Error in Expression'

krishnacbe
Partner - Specialist III
Partner - Specialist III

Sorry there was a Typo. Try below

=NUM((SUM(transTOTALSALE)+ SUM({$<transTYPE={"RETURN"}>}transQUANTITY * transBASEPRICE ) - projREV,'#$,###.##')

its_anandrjs

Try to add this

=NUM(SUM(transTOTALSALE),'USD #,##0.00', '.',',')+ NUM(SUM({$<transTYPE={"RETURN"} }>} transQUANTITY * transBASEPRICE),'USD #,##0.00', '.',',') - projREV

krishnacbe
Partner - Specialist III
Partner - Specialist III

=NUM((SUM(transTOTALSALE)+ SUM({$<transTYPE={"RETURN"}>}transQUANTITY * transBASEPRICE )) - projREV,'#$,###.##')

evansabres
Specialist
Specialist
Author

Thank you

krishnacbe
Partner - Specialist III
Partner - Specialist III

or

=NUM((SUM(transTOTALSALE)+ SUM({$<transTYPE={"RETURN"}>}transQUANTITY * transBASEPRICE )) - projREV,'$#,##0.00')

jduenyas
Specialist
Specialist

Why do you have the extra # in front of the $ sign. That messes up the formatting.

NUM(SUM(transTOTALSALE),'#$,###.##')+...

Having said that, the other reply is correct . NUM( expression + expression +... 'FORMAT')

You may also NUM(Expression,'FORMAT') + NUM(Expression,'FORMAT') + ... but it is not necessary and takes longer to process.