Forum Discussion
Stacked Column chart with values from multiple columns
- 9 years ago
Hi sseverson12
In this scenario, I suppose the table looks like below after adding four calculated columns using the formula you provided:
Based on this table, then new four tables for PE, FD, EX,CM. As an example, below is the DAX for the PE table:
Table1 = ADDCOLUMNS(SELECTCOLUMNS(MergedTable,"Status",MergedTable[PEStatus]),"Category","PE")
After all tables being prepared, union them:
Table5 = ADDCOLUMNS(UNION(Table1,Table2,Table3,Table4),"Value",1)
Then, create a stacked column chart with "Category" as the Axis, "Status" as the legend and "Value" as value.
Best regards,
Yuliana Gu
Hi,
Here's an idea:
- create a calculated column 'category' which will contain either 'PE', 'FD', 'CM' or 'EX'
- create seperate calculated columns 'closed', 'open' and 'bypassed' which will contain 1 or 0 depending on your logic.
now create your stacked column chart with 'category' as the Axis and 'closed', 'open' and 'bypassed' as the values.
hope this helps,
Dries