Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

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 pi...
  • Jihwan_Kim's avatar
    4 years ago

    Hi,

    Please check the below picture and the attached pbix file.

    It is for creating a calculated measure.

     

     

    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, "" )