Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi,
I created a Field Parameter (New Feature from May 2022) with a few dimensions (example: Country, OS, Product Name, etc.) to use as a Legend in a line chart. I use Chiclet Slicers (https://appsource.microsoft.com/en-us/product/power-bi-visuals/wa104380756?tab=overview) to select the dimension I want to see as the legend. While this methodology works, I'm looking for a way to have the that same chart without a legend as its default stage, then be able to click on these slicers to have a dynamic legend. In other words, I want to be able to go back and forth from 1 line (total) to whichever dimension I use in the slicer (multiple lines). I tried playing with the multiple selection settings but it would use the last slicer even by unselecting/select all.
Thanks!
Solved! Go to Solution.
Hi @Visiblo
I found a workaround. You can add the following measure in the model for none legend field. It returns blank value.
None Field = BLANK()
Then add this measure to your field parameter. For example,
Legend Field = {
("None", NAMEOF([None Field]), 0),
("Product", NAMEOF('Table'[Product]), 1),
("Region", NAMEOF('Table'[Region]), 2)
}
When selecting the None option, it displays all data without legend in the line chart. However, a weakness is that this added field cannot be used as the default option when no field is selected. It still selects the last non-blank field when no field is selected. There is no default option currently.
Here is one limitation it has currently:
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.
Hi, please find attached 2 pictures of the desired states for the line chart.
1. Total when nothing in the dynamic legend is selected. This currently doesn't work even without a dimension being selected in the chiclet slicer. It displays the last legend dimension selected.
2. Dynamic Legend where 'Region' is selected
Does that help? I could add a fixed column to my table with "Total", then add it to the field parameters but I was wondering if there was a more elegant way to do this.
Hi @Visiblo
I found a workaround. You can add the following measure in the model for none legend field. It returns blank value.
None Field = BLANK()
Then add this measure to your field parameter. For example,
Legend Field = {
("None", NAMEOF([None Field]), 0),
("Product", NAMEOF('Table'[Product]), 1),
("Region", NAMEOF('Table'[Region]), 2)
}
When selecting the None option, it displays all data without legend in the line chart. However, a weakness is that this added field cannot be used as the default option when no field is selected. It still selects the last non-blank field when no field is selected. There is no default option currently.
Here is one limitation it has currently:
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.
@Visiblo ,The information you have provided is not making the problem clear to me. Can you please explain with an example.
Appreciate your Kudos.
User | Count |
---|---|
93 | |
83 | |
77 | |
73 | |
66 |
User | Count |
---|---|
115 | |
105 | |
93 | |
65 | |
60 |