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: 
Not applicable

Conditional Number formatting in expressions

Why doesn't this add a $ to my output? This is the only case where I need the value to be represented as a monetary result.

Here is the current result:

Labels (1)
1 Solution

Accepted Solutions
girirajsinh
Creator III
Creator III

Hi

Try putting $ in Format code like '$#,###.00'

View solution in original post

6 Replies
girirajsinh
Creator III
Creator III

Hi

Try putting $ in Format code like '$#,###.00'

johnw
Champion III
Champion III

I'm not sure why it doesn't add $ to your output, and I agree with Girirajsinh that the $ would be better in the format code. It'll then remain a number instead of being converted to text. But I'd probably do this instead...

sum({<Account={'Travel ODC'}>} [Cost Amount])

...and format as money on the number tab.

Not applicable
Author

Hey guys- I switched up the formatting but it's still not giving me the expected $ in the output. I currently am only showing the Travel ODC account in my formula to test this out. There are 5 other accounts, 1 of which is labor. The output from that variable is hours, not dollars. This is why I do not want to format the entire expression as money on the Number Tab.

marcus_sommer
MVP
MVP

Like above mentioned you could simply use num() to format your wished output - it will work:

num(sum(Measure), 'hours #.##0,00')

- Marcus

Not applicable
Author

Well.. by checking the Number tab, I did find the problem. I'd overwritten the expression default to integer. I changed it back and now the suggested formatting from Girirajsinh works great.

Blonde moment I suppose...

sunny_talwar
MVP
MVP

Please close the thread by marking correct and helpful responses

Qlik Community Tip: Marking Replies as Correct or Helpful