cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Easy_E
Frequent Visitor

DAX measure : difference between 2 columns row by row

Hi everyone, 

I am struggling with to create a measure. I need to compute the difference between 2 values in two different columns. I created a calculated column wich serves the purpose but it slows down my model (see below).

 

Screenshot post.png

Is there some way to use a DAX measure to do the same computing without creating a calculated column ?

 

Thanks in advance ! 

1 ACCEPTED SOLUTION
SpartaBI
Community Champion
Community Champion

@Easy_E 
MEASURE = SUMX(Table,Table[Column1] - Table[Column2])

Regarding the SUMX it depends on what you want to show on the total. If it's summing them than SUMX, if it's averaging them than AVERAGEX etc 

View solution in original post

1 REPLY 1
SpartaBI
Community Champion
Community Champion

@Easy_E 
MEASURE = SUMX(Table,Table[Column1] - Table[Column2])

Regarding the SUMX it depends on what you want to show on the total. If it's summing them than SUMX, if it's averaging them than AVERAGEX etc 

Helpful resources

Announcements
August 1 episode 9_no_dates 768x460.jpg

The Power BI Community Show

Watch the playback when Priya Sathy and Charles Webb discuss Datamarts! Kelly also shares Power BI Community updates.

Power BI Dev Camp Session 24 without aka link and time 768x460.jpg

Ted's Dev Camp - July 28, 2022

Watch Session 24 of Ted's Dev Camp along with past sessions!

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Top Solution Authors
Top Kudoed Authors