Forum Discussion

rnnguyen's avatar
rnnguyen
Regular Visitor
4 years ago

DAX Measure finding MAXDATE

Hello All,

 

I need your help!  I've created a measure to pick up the latest CreateTimeStamp date but it summed up the total because the dates are the same.  I think it needs another MAX InvoiceKey in the measure to calculate 

 

InvoiceKeyTotalCreateTimestampSupplierConnectInvoiceKeyvendor_idInvoiceDetailsKeyInvoiceNumber  
223031.257/20/202217840CIV001222377235  
22305007/20/202217840CIV001222377235  
223056.257/20/202217840CIV001222377235  
22309007/20/202217840CIV001222377235  
226231.257/20/202218066CIV001225577235  
22625007/20/202218066CIV001225577235  
226256.257/20/202218066CIV001225577235  
22629007/20/202218066CIV001225577235  

 

CurrentDate =
    VAR a =
    CALCULATE(
        MAX('public AggregateCoding'[CreateTimestamp]),
        ALLEXCEPT('public AggregateCoding','public AggregateCoding'[InvoiceNumber])
    )
    RETURN
    IF(a = SELECTEDVALUE('public AggregateCoding'[CreateTimestamp]),1,0)

 

2 Replies

  • Please provide a more detailed explanation of what you are aiming to achieve. What have you tried and where are you stuck?

  • Hi rnnguyen ,

    Sorry not clear about your expected result. Your formula will return 1 for all rows, isn't it right?

    Looking forward to your reply.

     

    Best Regards,
    Community Support Team _ kalyj