Forum Discussion

abhiram342's avatar
abhiram342
Icon for Microsoft Employee rankMicrosoft Employee
3 years ago
Solved

Dynamic DAX Selected Measures

Hi , I'm looking assistance for creating measure based on selected date filter in below scenario DimDate DateId Month 20221001 Oct 20220930 Sep FactSales DatedId Amt 202210...
  • Jihwan_Kim's avatar
    3 years ago

    Hi,

    I cannot know how your datamodel or how your desired outcome looks like, but please try something like below.

     

    expected result measure: =
    VAR _maxdate =
        MAX ( 'Calendar'[Fiscal Date] )
    RETURN
        CALCULATE ( SUM ( 'FactSales'[Amt] ), 'Calendar'[Date] = _maxdate )