Forum Discussion
Dynamic X-Axis on Stacked Column chart (Month/Day/Hour) based on Date Slicer Selection
Hi jbarrosPT,
Thanks for reaching out to the microsoft fabric community.
Based on the official documentation, Field Parameters let report readers dynamically change the measures or dimensions they're analyzing in a report. You can create a field parameter by going to Modeling > New parameter > Fields, then provide a name for the parameter and select the fields you want to use.
After you create a field parameter, you can use it to control the values and axis used in a visual. For a chart, use a column-based field parameter in the axis field well of a visual.
The documentation also explains that you can apply visual-level filters by dragging a field to the Filters on this visual section in the Filters pane.
For more information, please refer to the official documentation:
- Use field parameters to let report readers change visuals: Use Field Parameters in Power BI Reports - Power BI | Microsoft Learn
- Add a filter to a report in Power BI: Add a Filter to a Report in Power BI - Power BI | Microsoft Learn
Thank you!
Just to close one gap for InmaVM , since it's the crux of the original question: field parameters on their own give the reader a manual picker — they'd have to select Month/Day/Hour themselves from a slicer.
What you asked for is the axis switching automatically off the Year/Month/Day slicers you already have on the page. That's the job of the Active Granularity measure in my reply above — the field parameter supplies the three axis options, and the ISFILTERED/SWITCH measure (dropped into the visual filter as "is 1") is what picks the right one with no extra interaction from the user. Field parameter alone = manual; field parameter + that measure = automatic. Happy to clarify any part of the setup.