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 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
- sseverson129 years agoFrequent Visitor
It worked!
The only thing I had to do on top this was to add a visual level filter to filter out the blank values.
Thank you!
- adamsumm8 years agoFrequent Visitor
This working very well, so thank you for that solution. Now I have the problem that the new tables have no connection back to my primary date key (each of my rows has a created by date feild). Do you know what I can include in the DAX function to give me a column with the date associated in the table?