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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
TesterPowerBI
Regular Visitor

How to get a concrete value from a table into a measure?

Hi all. I'm new in PowerBI, so apologies in advance for the very simple question.

 

I would like to create a measure that contains the value of Date modified row for Test Run Export XRay.csv file name (see image). In the example below the value I should be getting is: "20/08/2024 18:25:30".

TesterPowerBI_1-1724185515860.png

 

What I need to include in my measure?

 

Thank you so much in advance!

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

Hi,ryan_mayu ,thanks for your concern about this issue.

Your answer is excellent!
And I would like to share some additional solutions below.
Hello,@TesterPowerBI .I am glad to help you.
In addition to using the iterative function maxx, you can use the IF judgment or calculate the target value by using the calculate function in conjunction with the max function to achieve your needs.

vjtianmsft_0-1724204623396.pngvjtianmsft_1-1724204630450.png

measure:

M_1 = 
VAR _name=MAX('Table'[Name])
VAR _Extension=MAX('Table'[Extension])
VAR _modified=MAX('Table'[Date modified])
RETURN
CALCULATE(MAX('Table'[Date modified]),FILTER(ALL('Table'),CONTAINSSTRING(_name,"Test Run Support XRay.csv")))

measure:

M_2 = 
VAR _name=MAX('Table'[Name])
VAR _Extension=MAX('Table'[Extension])
VAR _modified=MAX('Table'[Date modified])
RETURN
IF(CONTAINSSTRING(_name,"Test Run Support XRay.csv"),_modified)

Below is my test data:

vjtianmsft_2-1724204723518.png

I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Carson Jian,
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

3 REPLIES 3
v-jtian-msft
Community Support
Community Support

Hi,ryan_mayu ,thanks for your concern about this issue.

Your answer is excellent!
And I would like to share some additional solutions below.
Hello,@TesterPowerBI .I am glad to help you.
In addition to using the iterative function maxx, you can use the IF judgment or calculate the target value by using the calculate function in conjunction with the max function to achieve your needs.

vjtianmsft_0-1724204623396.pngvjtianmsft_1-1724204630450.png

measure:

M_1 = 
VAR _name=MAX('Table'[Name])
VAR _Extension=MAX('Table'[Extension])
VAR _modified=MAX('Table'[Date modified])
RETURN
CALCULATE(MAX('Table'[Date modified]),FILTER(ALL('Table'),CONTAINSSTRING(_name,"Test Run Support XRay.csv")))

measure:

M_2 = 
VAR _name=MAX('Table'[Name])
VAR _Extension=MAX('Table'[Extension])
VAR _modified=MAX('Table'[Date modified])
RETURN
IF(CONTAINSSTRING(_name,"Test Run Support XRay.csv"),_modified)

Below is my test data:

vjtianmsft_2-1724204723518.png

I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Carson Jian,
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Thanks for the very detailed explanation! It worked.

ryan_mayu
Super User
Super User

@TesterPowerBI 

you can try this

 

Measure = maxx(FILTER('Table (2)','Table (2)'[name]="Test Run Export XRay.csv"),'Table (2)'[Date modified])
 
 




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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