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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

DAX calculated column or measure, and displaying in table

Hi,

I'm looking for help with creating a specific table based on my data.

My data contains various columns, shown below.

TESTING.PNG

When collecting data we have many experiments, each experiment is given a unique number, in the table above the experiments are represented in the "EXP" column.

 

Each experiment delivers a unique result, in the table above the result is represented in the "RESULT DATA" column.

 

When evaluating the results of an experiment they are typically compared to another experiment. In the table above the comparing experiment is listed as "COMPARE EXP".

 

When reviewing the result data the column "EXP DIFFERENCE" would result in -17 (EXP 1 (51), - EXP 2 (68)).

 

Now the part I need help with, I would like to have the "EXP DIFFERENCE" polulated in the table for each experiment. Is the correct way to handle this with a calculated column or a measure, and can you provide an example DAX of either or both methods?

 

1 ACCEPTED SOLUTION
TomMartens
Super User
Super User

Hey,

you can create a calculated column like so:

Diff = 
var thisResult = 'tablename'[Result Data]
var lookupExperiment = 'tablename'[Compare Exp]
var lookupResult = LOOKUPVALUE('tablename'[Result Data] , 'tablename'[Exp] , lookupExperiment )
return
thisResult - lookupResult

Hopefully this is providing what you are looking for.

 

Regards,

Tom

 

 

 

 

 



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

View solution in original post

2 REPLIES 2
TomMartens
Super User
Super User

Hey,

you can create a calculated column like so:

Diff = 
var thisResult = 'tablename'[Result Data]
var lookupExperiment = 'tablename'[Compare Exp]
var lookupResult = LOOKUPVALUE('tablename'[Result Data] , 'tablename'[Exp] , lookupExperiment )
return
thisResult - lookupResult

Hopefully this is providing what you are looking for.

 

Regards,

Tom

 

 

 

 

 



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany
Anonymous
Not applicable

@TomMartens 

Thanks for the help!!

Exactly what I was looking for.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors