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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
jadams123
Creator
Creator

Quick question

I am trying to use this code in a text box:

=Sum( {$<YEAR = {$(#=Max(YEAR))}, [Week No]= {$(#=Max([Week No]))}, DT = {'Date'}, CT -= {ITC}, DCCF = {YES}>} $(vMargin))

and its showing me this number: 906086.66789

When I want it to show as: $906,086.66

When I do this:

=Sum( {$<YEAR = {$(#=Max(YEAR))}, [Week No]= {$(#=Max([Week No]))}, DT = {'Date'}, CT -= {ITC}, DCCF = {YES}>} AMOUNT)

Its show me the number as $3,000,000.86 (perfectly)

Thanks,

J

Labels (1)
3 Replies
swuehl
Champion III
Champion III

Try

= Money(

Sum( {$<YEAR = {$(#=Max(YEAR))}, [Week No]= {$(#=Max([Week No]))}, DT = {'Date'}, CT -= {ITC}, DCCF = {YES}>} $(vMargin))

)

and set the money format in the script (at the very beginning, the format codes are defined).

MK9885
Master II
Master II

Maybe this?

num(Sum( {$<YEAR = {$(#=Max(YEAR))}, [Week No]= {$(#=Max([Week No]))}, DT = {'Date'}, CT -= {ITC}, DCCF = {YES}>} $(vMargin))) ,'$#,##0;($#,##0.00)')

its_anandrjs
Champion III
Champion III

Try this in any text object

=NUM( Sum( {$<YEAR = {$(#=Max(YEAR))}, [Week No]= {$(#=Max([Week No]))}, DT = {'Date'}, CT -= {ITC}, DCCF = {YES}>} $(vMargin)),'$#,##0.00', '.',',')