Forum Discussion
bo_afk
7 years agoPost Patron
Can't find grouping function
Hi, I want to group together categories into custom categories, as is shown in this link (https://docs.microsoft.com/en-us/power-bi/desktop-grouping-and-binning). But when I right-click on the vi...
jsh121988
7 years agoMicrosoft Employee
You create the grouping using a calculated column in the field list under the table, not the visual itself. You then set the axis to this new calculated column.
MyGroup = // This is exactly what the grouping function does, but this gives you more control over logic
SWITCH( TRUE(),
[Col1] = "This" && [Col2] = "That", "ThisThat", // && is AND
[Col1] = "That" || [Col2] = "This", "ThatThis", // || is OR
"SomethingElse" // This is the value if no other conditions is met
)