Forum Discussion
New column
Anonymous Try using Grouping feature. Your total row will contain all costs.
- Anonymous4 years agoNot applicable
Hi Greg_Deckler
What I want to add are rows with the logic mentioned above.
I used the following expression to create the column Income with the rows names Group1, Group2, and Group3, but I don't know how to get the row name All costs( it's the sum of the other three rows)Income=
var g1 = account no=3 var g2 = account no= 2 || account no= 3 || account no = 5 && account group <> 20 var g3= account group = 20 return SWITCH(TRUE(),g1,"Group1",g2,"Group2",g3,"Group3")
So How can I add the row name All costs in the above expression?
- Greg_Deckler4 years agoCommunity Champion
Anonymous Use a disconnected table with your group names including the All costs group. Then you can create a measure like this:
Measure = VAR __Group = MAX('DisconnectedTable'[Column]) RETURN SWITCH(__Group), "Group1", CALCULATE('Table'[Income]),'Table'[AccountNo] = 3, ... )- Anonymous4 years agoNot applicable
Hi, sorry if my question was unclear.
What I want is to create a calculated column, not a measure. I have measures, and I want to visualize this calculated column using my already created measures.I want my calculated column to look like below
NewColumn
Group1
Group2
Group3
All Groups --> (when I visualize the column with measures for this row, the measure value should show the sum of Group1 + Group2 + Group3)I am using the expression below, but it's not giving me the expected results.
NewColumn= var g1 = account no=3 var g2 = account no in { 4, 5, 6} && account group <> 20 var g3= account group = 20 return SWITCH(TRUE(),g1,"Group1",g2,"Group2",g3,"Group3", g1 || g2 || g3, "All Groups" )