Forum Discussion

mravi0712's avatar
mravi0712
New Member
8 years ago

Dax Filter Formula

HI Guys,

 

I have a table which has 2 columns, first column has Dates in YYYY/MM format eg. 2017/01 and all are identical. No Duplicates.

In the second column i have values realted to each date.

My Requirement is i have create a measure where in have to get the value of Highest date.

 

For Eg:

Table Staructure

Date            Value

2017/01       20.5

2017/02       16.5

2017/03       19.3

2017/12       18.9

 

From the above table i have to get 18.9 as the value as Higest date is 2017/12.

Can you please help me with the DAX Query.

We have give the higest date dynamically not hard coded.

 

Thanks in Advance.

 

2 Replies

    • parry2k's avatar
      parry2k
      Super User

      mravi0712 assuming you first column is date, you can add following measure

       

      Most Recent Date Value = 
      VAR __recentDate = CALCULATE( LASTDATE(  Table1[Date] ), ALL( Table1[Date] ) )
      RETURN 
      CALCULATE( MAX( Table1[Amount] ),Table1[Date] = __recentDate )