Forum Discussion

gsed99's avatar
gsed99
Helper III
8 years ago
Solved

Measure breaking with aggregation

Hello, I am trying to apply a simple MAX calculation to a YYYYMM field, and I know the MAX value in the whole table is 201804. When I create a measure to calculate MAX, I use this formula: =MAX('Ma...
  • Greg_Deckler's avatar
    8 years ago

    Try this:

     

    MyMax = CALCULATE(MAX('MarketingSnapshot'[DateStampMonth]),ALL('MarketingSnapshot'))
  • edhans's avatar
    edhans
    8 years ago

    You cannot put a measure in a filter. See this post though on creating a calculated table with what you need then using that table value to be your filter.

     

    Or, you could create a calculated column in your table using the function Greg_Deckler gave as the column. Or create the value in Power Query as a caclulated column there and bring it into DAX that way.