Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
How do I change the click action of a stacked bar chart to filter the data (similar to using a slicer) instead of opening a matrix of the data when using a time metric as the legend? I also found that using a time value in the chart and then switching back makes the cross filtering not work by clicking on the chart.
I am able to get the result I want by changing the Legend to a different, non time value, but I would like to have the stacked values be yearly values and to filter to a specific year when clicked on.
I can generate sample data and provide an example PBI file if my explanation is difficult to follow
Solved! Go to Solution.
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
Try not to use the auto date/time feature. It interferes with a lot of things and is generally not needed.
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]))
Are you saying to not use date hierarchies at all? I didn't use a built in hierarchy, I went into the model tab and created a hierarchy called "Date Hierarchy" with levels Year, Month.
If hierarchies don't work very well, why does the power bi training documentation suggest creating a date hirearchy?
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.
Thanks for the insight. I'll try not using hierarchies and just layer the hierarchy in the fields for a visual instead
User | Count |
---|---|
84 | |
80 | |
72 | |
71 | |
55 |
User | Count |
---|---|
108 | |
106 | |
93 | |
84 | |
66 |