Forum Discussion
Janaya1
2 years agoFrequent Visitor
Change y-axis based on slicer clustered column chart
I am fairly new to Power BI, and am having trouble setting up a simple clustered column chart where I can select a column name from a slicer and have the chart switch to show those values. This was v...
- 2 years ago
Hi Janaya1
First you need to make a measure for each one, Right click the table and choose new measure:
Average of Assay A = Average(table[Assay A])Then create a field parameter
Modelling | Field Parameter | Fields
Name your new category and drag in all the measures.
Finally drag your new field into the Y axis, here mine is called Swap Assay
Done!This feature is called field parameters and can be used to swap categories like Day and Person but also KPIs like Assays A - D : https://learn.microsoft.com/en-us/power-bi/create-reports/power-bi-field-parameters
Janaya1
2 years agoFrequent Visitor
Thank you! I wonder if there is a way to do this quickly for my larger dataset with a few hundred columns.
- SamWiseOwl2 years ago
Super User
Modify the code that is generated by pasting in all the names of your columns.
Parameter = {("Animal", NAMEOF('Animal Table'[Animal]), 0),("Image Url", NAMEOF('Animal Table'[Image Url]), 1),("CentreName", NAMEOF('Centre'[CentreName]), 2)}