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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
arvindsj
Regular Visitor

I want to get a value 'BuildNumber' on charts based on latest execution date.

I need to publish latest value in 'BuildNumber' column based on latest date in "Exec_Time' column.  There are multiples build number in the column, I need to get build number based on latest execution date. I have pasted snap shot of table below. Any help how to get this done..!!

 

arvindsj_1-1616837935216.png

 

1 ACCEPTED SOLUTION
v-luwang-msft
Community Support
Community Support

Hi @arvindsj ,

You could use the following measure,wish it is helpful for you!

Measure =
VAR lastexec_time =
    CALCULATE ( MAX ( 'Table'[Exec_time] ), ALL ( 'Table' ) )
VAR build =
    CALCULATE (
        MAX ( 'Table'[BuildNumber] ),
        FILTER ( ALL ( 'Table' ), 'Table'[Exec_time] = lastexec_time )
    )
RETURN
    build

base data:

v-luwang-msft_0-1617097191294.png

after:

v-luwang-msft_1-1617097214359.png

 

 

Best Regards

Lucien

View solution in original post

3 REPLIES 3
v-luwang-msft
Community Support
Community Support

Hi @arvindsj ,

You could use the following measure,wish it is helpful for you!

Measure =
VAR lastexec_time =
    CALCULATE ( MAX ( 'Table'[Exec_time] ), ALL ( 'Table' ) )
VAR build =
    CALCULATE (
        MAX ( 'Table'[BuildNumber] ),
        FILTER ( ALL ( 'Table' ), 'Table'[Exec_time] = lastexec_time )
    )
RETURN
    build

base data:

v-luwang-msft_0-1617097191294.png

after:

v-luwang-msft_1-1617097214359.png

 

 

Best Regards

Lucien

@v-luwang-msft - thanks for your suggestion. This solution worked for me. 

Jihwan_Kim
Super User
Super User

Hi, @arvindsj 

Please correct me if I am wrong, but I assume the last date in Exectime column is based on the testID?

Then, please try the below.

if it is not working, please kindly share the sample pbix file. Then, I can try to come up with a more accurate measure. The data in the above picture looks all the same except the RUNID.

 

Latest Buildnumber =
VAR maxtime =
CALCULATE (
MAXX (
'Table',
'Table'[Exec_Time]
),
ALLSELECTED ( 'Table' ),
VALUES ( 'Table'[TestID] )
)
RETURN
CALCULATE (
SELECTEDVALUE ( 'Table'[BuildNumber] ),
'Table'[Exec_Time] = maxtime
)
 

Hi, My name is Jihwan Kim.

If this post helps, then please consider accept it as the solution to help other members find it faster.


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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