Forum Discussion
Reset Dynamic Legend with Field Parameters
- 4 years ago
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:
- There's no way for your report users to select "none" or no fields option. Selecting no fields in the slicer or filter card is the same as selecting all fields.
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:
- There's no way for your report users to select "none" or no fields option. Selecting no fields in the slicer or filter card is the same as selecting all fields.
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.