Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

COUNTROWS Duplicates Names with filter

Hi! I'm currently stuck on this what i believe should be a simple endevour. I am trying to count the duplicates Names within a table and i have a solution for that. Although, i want to count th...
  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi Anonymous ,

     

    Please remove the ALL() filter:

    New measure =
    var SelectedDate = MAXX(allselected(Sheet1), Sheet1[Week])
    var PreviousWeek = SelectedDate -1
    RETURN
    CALCULATE(
    COUNTROWS('Sheet1'),
    filter('Sheet1',
    'Sheet1'[Name] = max('Sheet1'[Name] ) && 'Sheet1'[Week] = PreviousWeek
    )

     

    Best Regards,
    Eyelyn Qin
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.