Forum Discussion
Filter on Click with Stacked Bar Chart with Year
- 3 years ago
No idea. Maybe it is easier for someone starting with Power BI. Or I just haven't found a truly good use case for them. But nowadays even the standard slicer supports multiple fields which show as an ad-hoc hierarchy too.
I can generate sample data and provide an example PBI file if my explanation is difficult to follow
yes please?
Here's a link to the sample data csv file and the power bi file. Hopefully they work.
EDIT: I found the issue, but it's really strange. Dragging the year field directly to the Legend makes clicking on the year filter to that year, but clicking the checkmark in the data tab, which adds the year to the X-axis, and then moving it to the Leged field makes clicking on the year show the raw data.
I also found that I have to remove all the fields and re-add them by dragging the data sources to the correct fields to convince it to filter instead of showing the raw data
- lbendlin3 years ago
Super User
Try not to use the auto date/time feature. It interferes with a lot of things and is generally not needed.
- Anonymous3 years agoNot applicable
I'm not using auto date/time to my knowlege. I have a full date table with a manually created date hirearchy (year > month) which is used as the date field for the table I'm having issues with.
Date table DAX:
Date = ADDCOLUMNS(
CALENDARAUTO(),
"Month", FORMAT([Date], "mmmm"),
"Year", YEAR([Date]),
"Day", DAY([Date]),
"Month Number", MONTH([Date]))- lbendlin3 years ago
Super User
Let me extend that. Try not to use any of the built in hierarchies. There's very seldom a need for them, especially when your visual doesn't use all the fields.