Forum Discussion

Newbie_2020's avatar
Newbie_2020
Frequent Visitor
6 years ago
Solved

How to get a value from another table based on the max date selected in a filter?

Hi everyone, I'm really new to Power BI and need some help.  🙂 Would you be able to help me write a DAX formula to get the YTD Plan based on the max date selected in a date filter? Ex: I have a d...
  • Greg_Deckler's avatar
    Greg_Deckler
    6 years ago

    Sure, just change the aggregation:

     

    Month YTD Goal (Measure) = 
      VAR __MaxDate = MAX('Date'[Date])
    RETURN
      SUMX(FILTER(ALL('Table 2'),'Table 2'[Date] = __MaxDate),'Table 2'[YTD Plan])