March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi
I have created two different groupings (1-2,3-4,5-10) and (1-3,4-7, Other).
The groupings are used as legende in a bar chart.
Is it possible eg. with a slicer, to dynamically change which grouping is displayed? or is there another way to do this?
Solved! Go to Solution.
Hi @Anonymous
Do you mean you'd like to dynamically change the legend displaying?
I'm afraid it's not able to use slicer to change legend dynamically based on checked column names from the slicer visual currently. The workaround is to create drill down report.
You might refer to below similar threads:
https://community.powerbi.com/t5/Desktop/Dynamic-Legend/td-p/18745
Hi @Anonymous ,
I know you already marked this as solved but this is available make some additonal table for your slicer settings:
Slicer =
UNION (
//Group 1
SUMMARIZE (
'Table';
'Table'[Category];
"Legend"; VALUES ( 'Table'[Category (groups 1)] );
"Slicer"; "GROUP1"
);
//Group 2
SUMMARIZE (
'Table';
'Table'[Category];
"Legend"; VALUES ( 'Table'[Category (groups 2)] );
"Slicer"; "GROUP2"
)
)
Now that you have this table createa relationship between the category on this table and the category on the other table this will create a many to many relationship with filter for both side.
Now just add the column Legend to your legend on the bar chart and the column or measure you need to the values.
Be aware that you need that the slicer be with unique values otherwise you will get all the values on your table check PBIX file attach:
This can also be used to change values of axis based on different columns as products, countrys and so on.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @Anonymous ,
I know you already marked this as solved but this is available make some additonal table for your slicer settings:
Slicer =
UNION (
//Group 1
SUMMARIZE (
'Table';
'Table'[Category];
"Legend"; VALUES ( 'Table'[Category (groups 1)] );
"Slicer"; "GROUP1"
);
//Group 2
SUMMARIZE (
'Table';
'Table'[Category];
"Legend"; VALUES ( 'Table'[Category (groups 2)] );
"Slicer"; "GROUP2"
)
)
Now that you have this table createa relationship between the category on this table and the category on the other table this will create a many to many relationship with filter for both side.
Now just add the column Legend to your legend on the bar chart and the column or measure you need to the values.
Be aware that you need that the slicer be with unique values otherwise you will get all the values on your table check PBIX file attach:
This can also be used to change values of axis based on different columns as products, countrys and so on.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi again Miguel.
Thank you for your time and your elegant solution. I need the solution to divide population data into different age groups. After digging further into the topic, I found a solution from Guy in a Cube that I have chosen to use. In this solution the grouping is done in power query. Before I saw your solution, it had not occurred to me that the solution could work for both axes and legends.
Hi @Anonymous
Do you mean you'd like to dynamically change the legend displaying?
I'm afraid it's not able to use slicer to change legend dynamically based on checked column names from the slicer visual currently. The workaround is to create drill down report.
You might refer to below similar threads:
https://community.powerbi.com/t5/Desktop/Dynamic-Legend/td-p/18745
Hi @Anonymous ,
If you look at the table you can see the group you have created (has an icon of a square divided in 4) you can use that group / binning in a slicer and that will filter out your bar chart.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi Miguel - thanks for your quick response.
What I need do, is to be able to choose between 2 different groupings and not between the elements in one grouping.
regards
Søren
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
123 | |
86 | |
76 | |
57 | |
52 |
User | Count |
---|---|
201 | |
137 | |
108 | |
73 | |
68 |