Forum Discussion
Dynamic x-axis adjusted by slicer
- 1 year ago
Hi sparker95 ,
To create a dynamic x-axis that adjusts according to your slicer selection and supports multiple series, you need to use a disconnected table for the x-axis values and link it via dynamic DAX measures. First, generate a disconnected table for your x-axis range dynamically, for instance:
DynamicXAxis = GENERATESERIES(MIN('YourTable'[XValue]), MAX('YourTable'[XValue]), 1)Next, for each series measure (e.g., predictions, benchmark values), create dynamic measures using the disconnected axis. For example:
BenchmarkValue = CALCULATE( SUM('YourTable'[BenchmarkValue]), FILTER('YourTable', 'YourTable'[XValue] = SELECTEDVALUE(DynamicXAxis[Value])) )Apply this pattern for each series you wish to visualize, replacing the relevant measure columns accordingly. Now, place the disconnected table (DynamicXAxis[Value]) onto your visual's x-axis, and your dynamic measures on the y-axis. This approach maintains responsiveness to your slicer selections, enables multiple series display, and resolves the limitation you're facing.
Best regards,
Hi thank you for your response, my issue with your solution is by creating a dynamic axis as you have done in a seperate table, it is not responsive to the slicers on the page. As slicers don't affect calculate tables/columns