Forum Discussion
Power BI Basics - Column charts
- 9 years ago
Hi Mladen,
The connection and slicers I used for Table1 are not working with NewTable. Do somebody know how to fix this?
Not like measures, calculate tables/columns don't respond to user selections on the report. So your new created table won't be affected by the slicers on the your report.
After reviewing your original dataset, I would suggest you use Unpivot option under Query Editor > Transform to unpivot your "2012 - product AAA - Sales", ... , "2016 - product BBB - Sales" columns first.
Then, Split the "Attribute" column with "-".
And Rename the columns like below.
Last, you should be able to use a Matrix visual with "Product" as Rows, "Year" as Columns, and "Sales Revenue" as Values on the report. :smileyhappy:
Regards
You'll need to ensure that your tables are related to one another in your data model for the slicers from one table to affect the other. It sounds like you want a stacked column chart with Year as the horizontal axis, product as the legend and sales as the value.
- Mladen9 years agoRegular Visitor
Yeah, that's exacly what I would like to produce. Can someone tell me what a DAX for generating such a new table should be? Should I then estabish relationships between the tables manually?
- Mladen9 years agoRegular VisitorAllright, I found a workaround to create the new table with:NewTable =UNION (ROW ( "Year"; 2012; "Sales Prduct A"; SUM(Table1[ProductAAA]; "Sales Prduct B"; SUM(table1[ProductBBB]))ROW ( "Year"; 2013; "Sales Prduct A"; SUM(Table1[ProductAAA]; "Sales Prduct B"; SUM(table1[ProductBBB]))......)The connection and slicers I used for Table1 are not working with NewTable. Do somebody know how to fix this?Thanks very much for your help guys! best regards,Mladen
- v-ljerr-msft9 years ago
Microsoft Employee
Hi Mladen,
The connection and slicers I used for Table1 are not working with NewTable. Do somebody know how to fix this?
Not like measures, calculate tables/columns don't respond to user selections on the report. So your new created table won't be affected by the slicers on the your report.
After reviewing your original dataset, I would suggest you use Unpivot option under Query Editor > Transform to unpivot your "2012 - product AAA - Sales", ... , "2016 - product BBB - Sales" columns first.
Then, Split the "Attribute" column with "-".
And Rename the columns like below.
Last, you should be able to use a Matrix visual with "Product" as Rows, "Year" as Columns, and "Sales Revenue" as Values on the report. :smileyhappy:
Regards