I'm working on a dashboard using a BYOD data file and I'm encountering a formatting issue with my measure values.
The issue is that some of the values should be displayed as currency ($#.##), while others should be a percentage (#.##%). When I use the Number formatting option, the percents display correctly, but I'm missing the $ in front of my desired currency values (see attached). Conversely, when I select the Currency formatting option, my currency values display correctly, but my percents revert to "NaN."
Is there a script I can add to my measure expression to change each value to the desired formatting?
Boberts, if I am understanding correctly you are trying to use two different formats for the same expression, and the only means to accomplish this is going to be to do things in the expression itself such that it determines what the value is and you apply the formatting you want directly in the chart expression. So an If statement that determines if the value is a percent or a currency value and then you apply the appropriate number format as the result of that check. Unfortunately I am not very swift when it comes to the development side of things, so I cannot really even give you an example. but now that I have clarified, someone that is may be able to make some suggestions. If you have an example of the two different data types resulting from that base expression you have, that could be very helpful along with that expression, so they can try to do the modification to it to get everything wrapped into one expression.
If I have misunderstood, per Arthur's post, a small sample app would like be the most helpful, but anything additional you can provide should help here, as I did check the screenshot, but that really did not help me understand things any better.
To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question. I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.