Forum Discussion

gilr1975's avatar
gilr1975
Helper I
6 years ago
Solved

Present the last month data

Hello,   I have Months slicer. I have a table with Emp.Id, Accumulated sickness dates and their ranges:   Emp.Id Months Accumulates Sickness days Sickness ranges 100 Jan 0% 0%-1.5% ...
  • ryan_mayu's avatar
    6 years ago

    gilr1975 

     

    I suggest you to add a date column

    Measure = 
    VAR d=max('Table'[date])
    Return maxx(FILTER('Table','Table'[date]=d),'Table'[accumulates])

     

  • ryan_mayu's avatar
    ryan_mayu
    6 years ago

    gilr1975 

     

    I am not sure how your data looks like. You still want the number of max month? Are there duplicated employees in the table for each month?

     

    I created test data.

    Measure = 
    VAR d=max('Table'[date])
    Return calculate(DISTINCTCOUNT('Table'[employee]),FILTER('Table','Table'[date]=d))

     

    It will be better if you share the excel screenshot of your data structure and expected results.