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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
MCosl
Frequent Visitor

Dynamic X Axis based on count of its number of values

Hello Everyone,

 

I would like some help creating a graph based on the following sample data:

 

Store IDProduct IDDaily Sales $Stock $
1A2840
1B2942
1C2750
2A1845
2B3745
3A3044
3B1640
3C1642
4A2850
4B3541
5A3048
5B3550
5C3140

 

I would have the stores on the X axis, in ascending Order vs a Calculated new Measure by Dividing Stocks vs Daily Sales, resulting in a graph similar to this:

MCosl_0-1716421398460.png

The problem is my data set is exponentially bigger with, more importantly, over 800 Stores, resulting in a given scrollbar for the X axis.

I am having trouble finding a way to visualize the X axis in a more compact way, ideally as a count or % of the total given sample of stores while retaining the ascending order. (Consider that I do have other filters, so the numbers of stores should adjust dynamically based on those)

Ideally, I am aiming to obtain a dynamic graph similar to this:

MCosl_1-1716422130105.png

Any help or suggestions is appreciated.

 

11 REPLIES 11
MCosl
Frequent Visitor

Hello, 

Using the pbix you shared, I would like to add a Slicer to adjust the graph based on Store size, like this:

MCosl_0-1717002240206.png

But the usual relationship Modeling does not work, so the graph does not adjust the X axis based on the stores that belong in each size Value.

I cannot assist you if you are unable to provide usable sample data. I hope someone else can help you further.

MCosl
Frequent Visitor

Hello,

I apologize for the late reply.

First of all, thank you for your help, the file you shared indeed solves the issue regarding the ranking I desired for the table.

I do have an additional question, an usual relationship model for the 2 tables does not seem possible with the current setup using the Store ID values, so is there a workaround to adjust the graph based on Store Size or Location Segmented Data?

Please provide sample data that fully covers your issue.
Please show the expected outcome based on the sample data you provided.

MCosl
Frequent Visitor

Fair enough, the sample size is indeed to small to make a scrollbar.

I made an ample enough size for it to behave similarly.

Sample.xlsx

Still not very useful.  The ratio is all in the same order of magnitude.  Barely registers as a hockey stick chart (reverse pareto)

 

lbendlin_0-1716517457611.png

 

MCosl
Frequent Visitor

I apologize, I do believe the sample I provided pretty much covers my issue, I could add a couple of columns that I would use as Filters depending on the information I wish to see:

Store IDProduct IDDaily Sales $Stock $Location Store Size
1A2862ZM
1B2954ZM
1C2157ZM
2A2553ZS
2B2176ZS
3A2266ZL
3B2170ZL
3C2375ZL
4A2165XS
4B2270XS
5A2061XL
5B2558XL
5C3077XL

 

Do let me clarify, If I use the Stores Codification as categorical on the X axis, the only problem I have is that there are too many data points so the graph has a scroll bar, which is visually obnoxious.

MCosl_2-1716503552435.png

 

If I use it as Continuous, The graph becomes compacted but the Order is based on the X Axis by default, resulting in this graph:

MCosl_1-1716503310427.png

And in this case, the order cannot be transfered to the Measured Value on the Y axis through the usual option within it.

If I remain unclear about my query, please do let me know.

 I do believe the sample I provided pretty much covers my issue

Your sample will not result in a horizontal scrollbar, and the values have the same order of magnitude.  This doesn't match the issue you are describing.

MCosl
Frequent Visitor

Hello,

 

The problem is when I make the X axis continuous / logarithmic, I lose the ascending order of the graph based on the calculated measure and there is no usual sorting through it, only the following option remain:

MCosl_0-1716488533514.png

 

Please provide sample data that fully covers your issue.

lbendlin
Super User
Super User

make the x axis logarithmic.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

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.