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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
CTW
Regular Visitor

Creating a Calculated from a other columns

Hi DAX professionals:

I've run into a issue where i'm trying to create a calculated column based off of other columns. please refer to the below screen shot to what my issue is:

 

Station                           S/N               TestTimeTest                      Result            TestTimeFr                         First Test result

terminator 11232/2/2018 13:00P2/2/2018 13:00P
terminator 11232/2/2018 13:15F2/2/2018 13:00P
terminator 11232/2/2018 15:00P2/2/2018 13:00P
terminator 11002/2/2018 14:00F2/2/2018 14:00F
terminator 11002/2/2018 14:20P2/2/2018 14:00F
terminator 11002/2/2018 14:21P2/2/2018 14:00F
terminator 11002/2/2018 14:30P2/2/2018 14:00F

I am trying to calculate column "First Test Result"  which fills the column with the very first test result value for that serial number.

i managed to calculate the column with the TestTime of the first test by using this DAX formula:

 

TestTimeFr = CALCULATE ( MIN ( 'Data'[TestTime]), FILTER ( 'data', 'Data'[S/N] = EARLIER ( 'Data'[S/N] ) && data[station] = EARLIER ( 'Data'[station] ) ) )

 

Now I just need some help to input the test result for the TestTimeFr in the column to get the First Test Result.

Any help is greatly appreciated!

 

1 ACCEPTED SOLUTION
v-xjiin-msft
Solution Sage
Solution Sage

Hi @CTW,

 

Same to your DAX formula, try following calculated column:

 

First Test Result =
CALCULATE (
    MAX ( data[Result] ),
    FILTER (
        data,
        data[TestTimeTest] = data[TestTimeFr]
            && 'Data'[S/N] = EARLIER ( 'Data'[S/N] )
            && data[station] = EARLIER ( 'Data'[station] )
    )
)

11.PNG

 

Thanks,
Xi Jin.

View solution in original post

1 REPLY 1
v-xjiin-msft
Solution Sage
Solution Sage

Hi @CTW,

 

Same to your DAX formula, try following calculated column:

 

First Test Result =
CALCULATE (
    MAX ( data[Result] ),
    FILTER (
        data,
        data[TestTimeTest] = data[TestTimeFr]
            && 'Data'[S/N] = EARLIER ( 'Data'[S/N] )
            && data[station] = EARLIER ( 'Data'[station] )
    )
)

11.PNG

 

Thanks,
Xi Jin.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.