cancel
Showing results for
Did you mean:

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Post Prodigy

## 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!

Mark my post as a solution!

1 ACCEPTED SOLUTION
Super User

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.

3 REPLIES 3
Super User

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.

Post 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]))

Mark my post as a solution!

Super User

Try to use FORMAT DAX in your measure.

https://docs.microsoft.com/en-us/dax/format-function-dax

Announcements

#### Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

#### Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

#### Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors