the color expression is the wrong place to change the number format.
You have two choices:
1. You can use the measure expression field and use the expression you use above. The red frame just shown up because I don't have a "Quantity" field in this application. This working also for text objects, etc..
2. You can use the Numer formatting field under your measure, for your requirement select number and then the first option for integer numbers in the next drop down menu. In many graphs you can use simple expression and change number formatting from auto to a specific format using the "Number formatting" & "Formatting" drop down lists.
Please let me know if this solve your problem. The color expression field is only for color expression and will not change your number format also when the expression is correct. The popup will use the same number format like the graph, there is no possibility the use two different formats for axis and popup.