Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
adamsumm
Frequent Visitor

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.  

powerbi_db.png

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)

 powerbi_column.png

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,  

 

1 ACCEPTED SOLUTION
Vvelarde
Community Champion
Community Champion

@adamsumm

 

Hi, you can Unpivot Columns in Query Editor. After that the chart will be easy to recreate.

 

Regards

 

Victor

Lima - Peru




Lima - Peru

View solution in original post

1 REPLY 1
Vvelarde
Community Champion
Community Champion

@adamsumm

 

Hi, you can Unpivot Columns in Query Editor. After that the chart will be easy to recreate.

 

Regards

 

Victor

Lima - Peru




Lima - Peru

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.