Forum Discussion

newpbiuser01's avatar
newpbiuser01
Helper V
3 years ago
Solved

Formatting difference between two numbers

Hello,   I'm trying to use a measure to calculate the difference between last years and this year spend and format it to show the data as thousands, millions etc.    I'm using the following measu...
  • Wilson_'s avatar
    3 years ago

    Hello,

     

    All your YoY values are negative, and therefore are all less than 1,000. The implicit assumption in your SWITCH statement is that YoYAmount will always be positive. Therefore, you need to wrap all your YoYAmount variables in the SWITCH statement in an ABS function.


    ----------------------------------
    If this post helps, please consider accepting it as the solution to help other members find it quickly. Also, don't forget to hit that thumbs up and subscribe! (Oh, uh, wrong platform?)