Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
Nanakwame
Helper II
Helper II

Difference between two amounts (Measures or columns)

Hi All,

 

I am building a dashboard off sales data with sales values, back order amount values, open order amount values etc. 

I have a trend graph showing back order amount values and open order amount by month. 

I am looking for a dax function to calculate the difference between the 2 measures (back order amount and open order amount). Please note that the x axis is a drill down so it can be drilled down by quater, week etc. I will prefer for this dax function to take the drill down values into consideration. 

 

Please see image of graph below

 

Nanakwame_1-1633042379790.png

 

1 ACCEPTED SOLUTION
VahidDM
Super User
Super User

Hi @Nanakwame 

 

Try this:

 

Variance = [Back Order Amount]-[Open Order Amount]

 

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

Appreciate your Kudos!!

 

View solution in original post

3 REPLIES 3
VahidDM
Super User
Super User

Hi @Nanakwame 

 

Try this:

 

Variance = [Back Order Amount]-[Open Order Amount]

 

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

Appreciate your Kudos!!

 

That worked Sir. What if i wanted to create the percent difference of between the two?

Percent Variance =
Var _Variance =[B
ack Order Amount]-[Open Order Amount]
return
_Variance/[Back Order Amount]   //or _Variance/[Open Order Amount]

 

 

Change the format to percentage. 

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

Appreciate your Kudos!!

 

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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