Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
sparker95
Frequent Visitor

Dynamic x-axis adjusted by slicer

I am not sure how to upload my model so please see my images. pic 2 demo.jpg

 

pic1 demo.jpg

 



I have a dynamic x-axis which needs to adjust according to the slicer on the page 'Model Name'. I am able to use this as an x-axis on a scatter graph if I use alongside my Values column (see Graph 1). However as on Graph 2, I want to add different series to my graph as I have done in Graph 2. However in Graph 2 there is not a way for me to use my 'dynamic x-axis values' as the x-axis. 

1 ACCEPTED SOLUTION
DataNinja777
Super User
Super User

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,

View solution in original post

5 REPLIES 5
v-pgoloju
Community Support
Community Support

Hi @sparker95,

 

Just following up to see if the solution provided was helpful in resolving your issue. Please feel free to let us know if you need any further assistance.

If the response addressed your query, kindly mark it as Accepted Solution and click Yes if you found it helpful  this will benefit others in the community as well.

 

Best regards,

Prasanna Kuma

v-pgoloju
Community Support
Community Support

Hi @sparker95,

 

Thank you for reaching out to the Microsoft Fabric Forum Community.

 

Create a separate table for the x-axis using GENERATESERIES() with a full range of values. This table won’t change when you use slicers, but that’s okay you’ll handle slicer filtering inside each measure using DAX. So even if the x-axis stays the same, the lines on the chart will still respond correctly to your slicer selections.


If you found this information helpful, please consider marking the response as accepted and giving it a thumbsup. This will help others who may have similar questions. If the issue persists, feel free to reach out to us, we are here to assist you.

 

Warm regards,
Prasanna Kumar

 

sparker95
Frequent Visitor

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

v-pgoloju
Community Support
Community Support

Hi @sparker95,

 

Thank you for reaching out to the Microsoft Fabric Forum Community. And aslo thanks to @DataNinja777 for promt and helpful solution.

 

Just following up to see if the solution provided was helpful in resolving your issue. Please feel free to let us know if you need any further assistance.

If the response addressed your query, kindly mark it as Accepted Solution and click Yes if you found it helpful  this will benefit others in the community as well.

 

Best regards,

Prasanna Kumar

DataNinja777
Super User
Super User

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,

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.