When I use a custom format on my data, the data gets sorted based on the first number as shown below.
This is the code I am using, I have tried with max instead of values and without stating that it can't be 0.
Also have used the "Currency" option, however this put all the negative numbers at the top of the list as they where in ().
Sales = if(HASONEVALUE('Table'[Table]),
"Revenue" && [Rev LW]<>0, FORMAT ([Rev LW], "$#,###"),
"Units" && [Units LW]<>0, FORMAT([Units LW], "0")),
Can anyone give me any ideas on how best to tackle this,