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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Finding the Latest Transaction

I'm new at using Power BI and I need a little help. The goal is to find the latest transaction. For example, I'm a pizza company. I want to show the lifecycle of the latest transaction of making a pizza. How do I portray which action was completed last? Below, you will find current data and expected output. Any advice is appreciated.

 

Here is current data:

Alert_IDStatusTransaction_Date 
1New2/1/2022
1In Progress2/6/2022
1Complete2/9/2022
2New2/1/2022
3New2/2/2022
3Complete2/3/2022

 

Here is the expected output:

Alert_IDStatusTransaction_Date IsLatestTransaction
1New2/1/2022 
1In Progress2/6/2022 
1Complete2/9/20221
2New2/1/20221
3New2/2/2022 
3Complete2/3/20221
1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi,

Please check the below picture and the attached pbix file.

It is for creating a calculated measure.

 

Picture1.png

 

IsLatestTransaction: =
VAR currentID =
MAX ( Data[Alert_ID] )
VAR currentIDTable =
FILTER ( ALL ( Data ), Data[Alert_ID] = currentID )
VAR latestdate =
MAXX ( currentIDTable, Data[Transaction_Date ] )
RETURN
IF ( MAX ( Data[Transaction_Date ] ) = latestdate, 1, "" )
 

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Thank you so much!!

Jihwan_Kim
Super User
Super User

Hi,

Please check the below picture and the attached pbix file.

It is for creating a calculated measure.

 

Picture1.png

 

IsLatestTransaction: =
VAR currentID =
MAX ( Data[Alert_ID] )
VAR currentIDTable =
FILTER ( ALL ( Data ), Data[Alert_ID] = currentID )
VAR latestdate =
MAXX ( currentIDTable, Data[Transaction_Date ] )
RETURN
IF ( MAX ( Data[Transaction_Date ] ) = latestdate, 1, "" )
 

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.