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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Anonymous
Not applicable

Measure to get the maximum submission date for a single unique ID?

I have an excel file in my Power BI workbook that has repeat values for the primary ID, Org Code. It's a unique ID assigned to each company, shown below

 

 

jsauerla_0-1614009821159.png

 

 

My objective is to create a measure which calculates the latest (maximum) submission date for a company when the Process Step is Approval, Upload, or Resubmission. Shown below is the excel version of this calculation, and what I'd like to have in Power BI

 

example2.PNG

 

Here's the code I have tried -- believe I might have an erorr somewhere as it doesn't work... I want the MAX of the three upload approval resubmission for each unique org code

 

Latest Submission Date = CALCULATE(MAX('Approval Process Audit Log'[Status Change Date]), FILTER('Approval Process Audit Log','Approval Process Audit Log'[Process Step] = "Upload" , 'Approval Process Audit Log'[Process Step] = "Approval" , 'Approval Process Audit Log'[Process Step] = "Resubmission"))

 

 

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

Hi @Anonymous ,

 

Check the measure.

Measure = CALCULATE(MAX('Table'[date]),FILTER(ALLEXCEPT('Table','Table'[id]),'Table'[step]<>"rejection"))

15.PNG 

 

Best Regards,

Jay

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.

View solution in original post

4 REPLIES 4
v-jayw-msft
Community Support
Community Support

Hi @Anonymous ,

 

Check the measure.

Measure = CALCULATE(MAX('Table'[date]),FILTER(ALLEXCEPT('Table','Table'[id]),'Table'[step]<>"rejection"))

15.PNG 

 

Best Regards,

Jay

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.
amitchandak
Super User
Super User

@Anonymous , Try like

 

Latest Submission Date = CALCULATE(MAX('Approval Process Audit Log'[Status Change Date]), FILTER('Approval Process Audit Log','Approval Process Audit Log'[Process Step] in{ "Upload" , "Approval" , , "Resubmission"}))

 

Latest Submission Date = CALCULATE(MAX('Approval Process Audit Log'[Status Change Date]), FILTER('Approval Process Audit Log','Approval Process Audit Log'[Process Step] in{ "Upload" , "Approval" , , "Resubmission"}) , allexcept('Approval Process Audit Log','Approval Process Audit Log'[Org_code]))

Anonymous
Not applicable

Hello @amitchandak -- thank you for the response. Would these measures be able to be added to a matrix table, or is that not possible? It appears to not let me add them as matrix table only accepts one column field, [Process Step] and doesn't let me use the new measure at all

Helpful resources

Announcements
Sept PBI Carousel

Power BI Monthly Update - September 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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