Forum Discussion

Noadekat's avatar
Noadekat
New Member
2 years ago
Solved

Make a measure with filter

Hello,   I would like to make a visual to compare all data with the data of an selected filter. I thougt I would do this with a measure. This is my measure for all data:    Average mistakes tota...
  • Joe_Barry's avatar
    Joe_Barry
    2 years ago

    Then you need to create a 2nd measure. Keep your original measure for filtering per Subject.

    Use this for the whole Average

    Average All =
    VAR _AllMistakes = CALCULATE(SUM('Technical Research'[Number of Mistakes]), ALL ('Technical Research'))
    VAR _AllSubjects = CALCULATE(COUNT('Technical Research'[Subjects]), ALL ('Technical Research'))
    
    RETURN
    DIVIDE(_AllMistakes, _AllSubjects, 0)

     

    Change Count to Distinctcount if you are looking for unique number for teh subjects.

     

    Add both measures to the Visual

     

    Joe