Forum Discussion

dmalviya's avatar
dmalviya
Frequent Visitor
8 years ago
Solved

DAX - How to Get Max Date from DimDate

I have DimDate with monthly granularity for 3 year from 2015 to 2017. I want to create measure which will return Max date from date dimesion. I tried using below logic but None is working. Please help.

 

MAX(DimDate[Date].[Date])

 

MAXX(DimDate,DimDate[Date].[Date])

 

Thanks

Deepak

 

  • Anonymous's avatar
    Anonymous
    8 years ago

    Then try this:

     

    Measure = CALCULATE( MAX( 'TableName' [Date]), ALL( 'TableName'))

3 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    You could try using this instead:

     

    MAX(DimDate[Date])

    • dmalviya's avatar
      dmalviya
      Frequent Visitor

      i already tried this one. When i drop the measure on table, It gives last date of each month.  I need last date of dimension table, irrespective of current cotext or filter. It should alwasy give last date of Date dimension.

      • Anonymous's avatar
        Anonymous
        Not applicable

        Then try this:

         

        Measure = CALCULATE( MAX( 'TableName' [Date]), ALL( 'TableName'))