Forum Discussion
Adding a new row to matrix
- 1 year ago
Hi leila675 - Create a disconnected table for row labels
GroupList =
DATATABLE("Group", STRING, {
{"Group A"},
{"Group B"},
{"Group C"},
{"Variance"}
})create a measure for totals to return Total2
NewTotal =
VAR SelectedGroup = SELECTEDVALUE(GroupList[Group])
RETURN
SWITCH(
TRUE(),
SelectedGroup = "Group A", CALCULATE(SUM(Table2[Value]), Table2[Group] = "Group A"),
SelectedGroup = "Group B", CALCULATE(SUM(Table2[Value]), Table2[Group] = "Group B"),
SelectedGroup = "Group C", CALCULATE(SUM(Table2[Value]), Table2[Group] = "Group C"),
SelectedGroup = "Variance",
CALCULATE(SUM(Table1[Value])) - CALCULATE(SUM(Table2[Value])),
BLANK()
)now place new total at values , Power BI will auto-calculate the Grand Total row (i.e., 47). Hope this works.
Hi leila675,
May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.
Thank you.