cancel
Showing results for
Did you mean:
Regular Visitor

## Max date from a table with one critera

Hello

I would like a measure or a column that shows the the max date in my date table (called 'Time') but where another critera is fulfilled ie in the example below, where the financial period status is 0.

 Date FinancialPeriodStatus Latest Reporting Date 01/01/2017 00:00 1 31-Dec-25 31/12/2016 00:00 0 31-Dec-16

I'm currently using the below formula, however this is not filtering the FinancialPeriodStatus by 0 so in the above example I would want the top row, last column to say 31-Dec-16 not 31-Dec-25

Latest Reporting Date = calculate(max('TIME'[Date]),allexcept('TIME','TIME'[FinancialPeriodStatus]))

Thank you

Chris

1 ACCEPTED SOLUTION

Accepted Solutions
Member

## Re: Max date from a table with one critera

Hello @birdie29,

Maybe you can try this.

Date = CALCULATE(MAX('TIME'[Date]) ; 'TIME'[FinancialPeriodStatus]="0")

5 REPLIES 5
Member

## Re: Max date from a table with one critera

Hello @birdie29,

Maybe you can try this.

Date = CALCULATE(MAX('TIME'[Date]) ; 'TIME'[FinancialPeriodStatus]="0")

Member

## Re: Max date from a table with one critera

For the overall latest reporting date try

```Max Latest Reporting Date =
CALCULATE(
MAX('TIME'[Date]);
ALL('TIME');
'TIME'[FinancialPeriodStatus]=0
)```

HTH,

Frank

Regular Visitor

## Re: Max date from a table with one critera

Hi @Birdjo

Perfect, thank you! I thought the solution would be a simple one but not that simple!

Chris

Regular Visitor

## Re: Max date from a table with one critera

Thanks for your quick response! I'm not sure I could get this to work based on your example. I think the issue is with the ALL('TIME'); 'TIME'[FinancialPeriodStatus]=0 ) part.

The previous answer from Birdjo has worked, however thank you very much for taking the time to respond.

Chris

Highlighted
Regular Visitor

## Re: Max date from a table with one critera

Hi Again

Apologies for bringing this topic up again, however although I can get the measure of this date I would really like a column with the date instead. Does anyone know how I could do this?

Thank you

Chris

Announcements

#### Community Highlights

Find out what's new in the Power BI Community!

#### Power Platform Summit North America

Register by September 5 to save \$200

#### Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

#### Watch Sessions On Demand!

Continue your learning in our online communities.

Top Kudoed Authors
Users Online
Currently online: 366 members 3,868 guests
Recent signins: