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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Las
Frequent Visitor

Calculation based on latest two dates

Hi Experts,

 

I have a date column which populates based on fortnightly basis ( Fortnightly is 14 days but I receive the data earlier ). My calculation should be based on Max(date) and the previous day that is available. 

 

Example:

Date received
15/04/2022
30/04/2022
12/05/2022

From the above dates, how do i select 30/04/2022 and 12/05/2022 only? and for the next month also the logic should work
the same way like selecting 12/05/2022 and 30/05/2022 (Future date, which is currently not available) automatically.

This might be an easy one but appreciate your help.

 

Thank you.

Las

1 ACCEPTED SOLUTION

@Las , refer

 

amitchandak_0-1651644408730.png

 

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

View solution in original post

4 REPLIES 4
Las
Frequent Visitor

Thank you. All good. 

amitchandak
Super User
Super User

@Las , Measures

 

Max date = maxx(allselected(Table), Table[Date])

 

2nd Max date = maxx(filter( allselected(Table), Table[Date] < [Max Date]) , Table[Date])

 

or

 

Max date = maxx(all(Table), Table[Date])

 

2nd Max date = maxx(filter( all(Table), Table[Date] < [Max Date]) , Table[Date])

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Hi Amit

 

Thanks for the prompt response.

2nd Max date, would this pick up 30/04 or 15/04?  Table[Date] < [Max Date] will search for the lowest and compared with the max date?

@Las , refer

 

amitchandak_0-1651644408730.png

 

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

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!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.