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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
gabrielvigo
Helper I
Helper I

Date of the last event

Hi everyone.

 

I have a table with some events.

I need identify the date of de last event and how many day passed.

 

Screenshot_1.png

I: 9/7/2018 - 1 day

II: 10/7/2018 - 0 day

III: 8/7/2018 - 2 day

IV:  3/7/2018 - 7 day

V: 4/7/2018 - 6 day

 

Is any formula that help me?

 

Thanks!

1 ACCEPTED SOLUTION

Hi, this was a big help.

 

The finally formula is:

Max_I = CALCULATE(MAX(Table1[Date]); Table1[I] <> 0; Table1[Date] <= TODAY())

 

I add a filter "<= Today", because I was having future results.

View solution in original post

4 REPLIES 4
v-yuta-msft
Community Support
Community Support

Hi gabrielvigo,

 

"

I: 9/7/2018 - 1 day

II: 10/7/2018 - 0 day

III: 8/7/2018 - 2 day

IV:  3/7/2018 - 7 day

V: 4/7/2018 - 6 day

"

 

<--- What does this mean and could you clarify your logic and expected result?

 

Regards,

Jimmy Tao

It is an example of what I want as a result.
The date of the last event of each categeoria (I, II, III, IV, V) and how many days passed.

Anonymous
Not applicable

Hi @gabrielvigo

 

Can you try this for column I and then replicate the same for otehrs, if ths is what you want.

Max_I= CALCULATE(MAX(Table1[Date]),FILTER(Table1,Table1[ColumnI]<>0))

 

Thanks
Raj

Hi, this was a big help.

 

The finally formula is:

Max_I = CALCULATE(MAX(Table1[Date]); Table1[I] <> 0; Table1[Date] <= TODAY())

 

I add a filter "<= Today", because I was having future results.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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