Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join us at the Cloud Data and Analytics Tour! REGISTER TODAY
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
Partner

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

View solution in original post

8 Replies
krishnacbe
Partner
Partner

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
Partner

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
Partner

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

View solution in original post

evansabres
Specialist
Specialist
Author

Thank you

krishnacbe
Partner
Partner

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.