Forum Discussion

tjordan08's avatar
tjordan08
Regular Visitor
2 years ago
Solved

Incorrect Month displayed when selecting full year in single choice filter

Hello, I have a dashboard that is showing the month /year based on a single choice filter and it works ok, except for when I select the full year ‘2022’ which selects all months up until December. Th...
  • tharunkumarRTK's avatar
    2 years ago

    tjordan08 
    You are using month name column in a date column hiearachy and used 'LAST' as an aggregation, instead create a measure with the below logic 

    maxMonth = 
    Var MaxMonthNum = max(Fact_Table[First seen].[MonthNo])
    return CALCULATE(MAX(Fact_Table[First seen].[Month]), Fact_Table[First seen].[MonthNo] = MaxMonthNum) 


    If the post helps please give a thumbs up


    If it solves your issue, please accept it as the solution to help the other members find it more quickly.


    Tharun

     

  • tharunkumarRTK's avatar
    tharunkumarRTK
    2 years ago

    tjordan08 

    try this formula

    maxMonth = Var MaxMonthNum = max('Calendar'[MonthNo]) return CALCULATE(MAX('Calendar'[Month]), 'Calendar'[MonthNo]= MaxMonthNum)