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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

DAX Help

Hi,

I'm new to DAX and would like some suggestions on how to complete the following;

sample.JPG

Table 1 represents the data as we recieve it from the source.

In our efforts to study the data we need to review the information by comparing Run to Run

Table 2 represents the Table 1 duplicated and filtered to only include Run 1

Table 3 represents the Table 1 duplicated and filtered to only include Run 2

We would like to return Table 4, this table would represent the Run 2 - Run 1 and deliver the data row by row as it relates to the attitude column (as shown above).

 

All help appreciated!!

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Thanks for the help, this is exactly what we were looking for!!

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

@Anonymous  - 

You can create a new Measure: 

Change In Attitude = 
var run1 = calculate(max('Table 1'[Data]), 'Table 1'[Run] = 1)
var run2 = calculate(max('Table 1'[Data]), 'Table 1'[Run] = 2)
return run2 - run1

Hope this helps,

Nathan

Anonymous
Not applicable

Thanks for the help!!

 

Is there a way to make the Run selection a slicer?

We some time have several hundred Runs to compare and creating a Measure for each senario will be quite a challange.

Anonymous
Not applicable

Yes, if you select 2 runs, you could do it like the following:

Change In Attitude = 
var firstrun = min('Table 1'[Run])
var secondrun = max('Table 1'[Run]) var run1 = calculate(max('Table 1'[Data]), 'Table 1'[Run] = firstrun) var run2 = calculate(max('Table 1'[Data]), 'Table 1'[Run] = secondrun) return run2 - run1

 

Anonymous
Not applicable

Thanks for the help, this is exactly what we were looking for!!

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors