Forum Discussion
Stacked Column chart with values from multiple columns and dates
Hello,
I am trying to create a bar graph that shows the values of 5 similar columns. Each column is a category that appears on a survey and the value of each column is a number from 1 -5. Each row also has a date created value and a ticket number. Both my date created column and ticket column link to primary keys in my data model so that I can easily sort on the visual.
I created the below chart by creating new tables using ADDColumn (following another forum i found)
The Dax functions for creating the new tables:
Table1 = ADDCOLUMNS(SELECTCOLUMNS(Raw_Data_20170814,"Status",Raw_Data_20170814[Courtesy]),"Category","Courtesy")
Table2 = ADDCOLUMNS(SELECTCOLUMNS(Raw_Data_20170814,"Status",Raw_Data_20170814[Knowledge]),"Category","Knowledge")
Table3 = ADDCOLUMNS(SELECTCOLUMNS(Raw_Data_20170814,"Status",Raw_Data_20170814[Overall]),"Category","Overall")
Table4 = ADDCOLUMNS(SELECTCOLUMNS(Raw_Data_20170814,"Status",Raw_Data_20170814[Quality]),"Category","Quality")
Table5 = ADDCOLUMNS(SELECTCOLUMNS(Raw_Data_20170814,"Status",Raw_Data_20170814[Timeliness]),"Category","Timeliness")
Table6 = ADDCOLUMNS(UNION(Table1,Table2,Table3,Table4,Table5),"Value",1)
This is possing a problem because the calculated columns do not take into account the date feild so now the bar chart cannot be filtered. I need a new solution for being able to accomplish a usable chart that looks like the one above.
Thank you,
Hi, you can Unpivot Columns in Query Editor. After that the chart will be easy to recreate.
Regards
Victor
Lima - Peru