Forum Discussion

netanel's avatar
netanel
Icon for Post Prodigy rankPost Prodigy
4 years ago
Solved

Diff % and money

Hello everyone!
I'm trying to make a simple difference formula
But the numbers are not correct for me ...
This is the formula

Net USD LM % difference from Net USD average per Day =
VAR __BASELINE_VALUE = [Net USD average per Day]
VAR __VALUE_TO_COMPARE = [Net USD average per Day LM]
RETURN
    IF(
        NOT ISBLANK(__VALUE_TO_COMPARE),
        DIVIDE(__VALUE_TO_COMPARE - __BASELINE_VALUE, __BASELINE_VALUE)
    )
Also attach a photo
 
Thanks all!
 
 
  • Hi netanel 

     

    Try this:

    Net USD LM % difference from Net USD average per Day =
    VAR __BASELINE_VALUE = [Net USD average per Day]
    VAR __VALUE_TO_COMPARE = [Net USD average per Day LM]
    Var _Variance = if(ISBLANK(__VALUE_TO_COMPARE),0,__VALUE_TO_COMPARE - __BASELINE_VALUE)
    RETURN
     DIVIDE(_Variance, __BASELINE_VALUE)
        

     

    If this post helps, please consider accepting it as the solution to help the other members find it more quickly.

    Appreciate your Kudos!!

3 Replies

  • Hi netanel 

     

    Try this:

    Net USD LM % difference from Net USD average per Day =
    VAR __BASELINE_VALUE = [Net USD average per Day]
    VAR __VALUE_TO_COMPARE = [Net USD average per Day LM]
    Var _Variance = if(ISBLANK(__VALUE_TO_COMPARE),0,__VALUE_TO_COMPARE - __BASELINE_VALUE)
    RETURN
     DIVIDE(_Variance, __BASELINE_VALUE)
        

     

    If this post helps, please consider accepting it as the solution to help the other members find it more quickly.

    Appreciate your Kudos!!

    • netanel's avatar
      netanel
      Icon for Post Prodigy rankPost Prodigy

      Hi Thanks for the quick response,

      something else if I want to get the result in dollars and not in percentages? I have tried this formula but it does not work for me.

      Diff $ = CALCULATE(SUMX('Revenues DB','Revenues DB'[Net USD average per Day]-'Revenues DB'[Net USD average per Day LM]))