Forum Discussion

mastone's avatar
mastone
Frequent Visitor
2 years ago
Solved

Incorrect total in Matrix

I have this matrix   I am having trouble getting the score totals to come out.  I tried to do the Sumx(summarize(), calc) calcuation but from the context of Survey I can't reach standards.  M...
  • mastone's avatar
    mastone
    2 years ago

    Thank you for the response.   The above didn't really solve the issue but I was able to get the result I needed.  Here is my final measure, which uses the SumX(summarize(), calc) pattern.

    Scored Standard =
    SUMX(
    SUMMARIZE(QuestionStandards,
    QuestionStandards[QuestionId],
    'Chapters'[Chapter],
    Standards[Standard],
    ElementOfPerformance[Element Of Performance])
    , [Scored])

    The stumbling block for me was going from the survey table at the start.  I couldn't cross through the the questionstandards table to walk the heirarchy.  But starting from the questionsstandards table allowed me to do it, and then the [scored] measure grabbed what it needed out of the survey table.

    But....as it turns out, Power Bi is smarter than me.  It was giving me the correct values as the results were non-additive.  The items that I thought were unique were not.  They were showing in both the EP 1 and EP 3 categories, so the fact that it didn't sum up was correct.   So the formula above gives me the result I was after, but it's not the correct result.