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
Anonymous
Not applicable

Difference between two values when one of the value is blank

Hi All,

I am a newbie to PBI. I have run into this issue with my matrix visual

Delta is calculated basically as the difference between Date 1 & Date 2 using DAX. If there is value in Date 1 (say 100) and a value in Date 2 (70) the Delta is 30. But like the table below sometimes the value in Date 1 is blank/empty/null and Date 2 has a value and vice verse . If that is the situation I need the Delta to show up as a negative and positive value respectively.
For example (see first 2 rows...3rd and 4th row are working as expected)

Date 1 Date 2 Delta
 100-100
100 100
906030
6090-30

 

Can someone help with this?
Thanks!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

Please refer to my pbix file to see if it helps you.

Create a column.

Delta_column = 'Table'[date 1]-'Table'[date 2]

Or a measure.

Delta_measure = MAX('Table'[date 1])-MAX('Table'[date 2])

vpollymsft_0-1654823838601.png

If I have misunderstood your meaning, please provide more details with your desired output(Final output in image form).

 

Best Regards

Community Support Team _ Polly

 

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

 

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @Anonymous ,

Please refer to my pbix file to see if it helps you.

Create a column.

Delta_column = 'Table'[date 1]-'Table'[date 2]

Or a measure.

Delta_measure = MAX('Table'[date 1])-MAX('Table'[date 2])

vpollymsft_0-1654823838601.png

If I have misunderstood your meaning, please provide more details with your desired output(Final output in image form).

 

Best Regards

Community Support Team _ Polly

 

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

 

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.

Top Solution Authors