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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
Anonymous
Not applicable

Multi IF function

Hi,

 

I have a list of id's, list of approval type and list of date / time against each approval type and id. 

 

Refer sample table below - 

 

Id     Approval type     Date/Time

x             a                 8/7/2015 6:44:00 PM

x             a                 8/7/2015 5:31:00 PM

x             b                 6/7/2015 5:31:00 PM 

y             a                 11/19/2015 4:36:00 PM

y             b                 11/25/2015 6:43:00 PM

y             b                 11/24/2015 8:41:00 AM

z             a                  12/4/2015 7:22:00 PM

 

 

I need to group these by ID, then approval type and then take only the latest apporoval date / time.

 

I am able to group them and create another table, but can someone explain how can i just filter on the latest date/time for each id and each record type within the id.

 

Thanks!

1 ACCEPTED SOLUTION
v-huizhn-msft
Microsoft Employee
Microsoft Employee

Hi @Anonymous


You’d better create a another table using SUMMARIZE Function. In the function, filter the latest date/time based on id and each record type. I try to reproduce your scenario as follows, please review.

Please click the new table(highlighted in yellow), then type the following formula. Run it , and you get expected result like the screenshot below. In the formula, the “Test” table is the same as your given sample data.

Table 2 = SUMMARIZE(Test,Test[Id],Test[Approval type],"Date",MAX(Test[Date/Time]))


1.png
 

If you have any question, please feel free to ask.

Best Regards,
Angelia

View solution in original post

2 REPLIES 2
v-huizhn-msft
Microsoft Employee
Microsoft Employee

Hi @Anonymous


You’d better create a another table using SUMMARIZE Function. In the function, filter the latest date/time based on id and each record type. I try to reproduce your scenario as follows, please review.

Please click the new table(highlighted in yellow), then type the following formula. Run it , and you get expected result like the screenshot below. In the formula, the “Test” table is the same as your given sample data.

Table 2 = SUMMARIZE(Test,Test[Id],Test[Approval type],"Date",MAX(Test[Date/Time]))


1.png
 

If you have any question, please feel free to ask.

Best Regards,
Angelia

Greg_Deckler
Community Champion
Community Champion

I believe that you want to create a measure like so:

 

Max Date/Time = MAX([Date/Time])

Use a matrix visualization and put Id, Approval Type and this measure into the matrix.

 

Not sure what this has to do with the title of the post.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors