Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Problem in selecting Max date

Hello,

 

Can anyone guide me into the right direction here?

 

I need to add a column to a table, that returns the maximum date value from the table, considering also the current filter selection.

 

It works perfectly well, when I add it as a measure, but I cannot seem to figure a way to return this value into the table behind to be used in the creation of another custom column.

 

The setup is pretty basic. A fact table joined to a Dimensional date table.

 

Thanks in advance for any advice.

6 Replies

  • themistoklis's avatar
    themistoklis
    Community Champion

    Anonymous

     

    Try the following DAX formula:

     

    Column = CALCULATE(MAX('Calendar'[Date]), ALL('Master Table'))

    Master Table is my fact table and Calendar is the custome calendar table.

    You can change them based on your needs

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi themistoklis

       

      Thanks for the reply.

       

      Unfortunately, this returns the max of the Calendar date table, without taking the active filtering into consideration.

       

      • themistoklis's avatar
        themistoklis
        Community Champion

        Anonymous

         

        When you say active filtering do you mean filter on dates or on other fields?

         

        Can you also share the file with us, and a sample of the desired output?