Forum Discussion
ct_tm
2 years agoHelper I
Count Measure Results in Summarized Table in Matrix Visual
Hello, I am working on a decently complex report page that contains a matrix that evaluates a score by Vice President and subordinate Manager. To save compute time for the end user I took most of th...
ct_tm
2 years agoHelper I
As an update I came across a question in a different forum that was able to solve a portion of the problem, while creating a new one.
powerbi - DAX grouping by a measure result - Stack Overflow
This now calculates the columns correctly (based on SCD2 history) but creates a problem at the row total level where now the row totals are 0. Probably has to do with the IF and SELECTEDVALUE.
Another issue is that this takes forever to calculate.
So, based on the link above and the code below how can I optimize this to produce a faster query with proper row totaling?
Count Ratings =
VAR table1 =
CALCULATETABLE(
SUMMARIZE(
tblRollupKey,
tblRollupKey[propMonthKey],
"Rating",
[Total FOCUS Rating]
),
FILTER('Calendar', 'Calendar'[MonthYearNum] = MAX('Calendar'[MonthYearNum]))
)
RETURN
SUMX(table1, IF([Rating] = SELECTEDVALUE('FOCUS Scoring'[Total Rating]), 1, 0))