Skip to content

Instantly share code, notes, and snippets.

@mikefrizzell
Created April 4, 2023 11:51
Show Gist options
  • Save mikefrizzell/a506162c0116413d1fdb12113730ae94 to your computer and use it in GitHub Desktop.
Save mikefrizzell/a506162c0116413d1fdb12113730ae94 to your computer and use it in GitHub Desktop.
// DAX code to combine multiple columns in Power BI
Combined Table =
UNION(
SELECTCOLUMNS(Table1, "Type", [category_a], "Number", [number_done_a]),
SELECTCOLUMNS(Table1, "Type", [category_b], "Number", [number_done_b])
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment