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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Br1-981
Helper I
Helper I

Same axes scale for different bar charts

Hi,

I have 2 bar charts:

Br1981_0-1707410585088.png

that are based on two different measures

Market Investment = SUM(INV[INVESTMENT])

Company Investment = CALCULATE(SUM(INV[INVESTMENT]), INV[BRAND]="COMPANY_X")

 

I want the second one that is always working on a smaller range to be working on the same Y-axys.

My idea is to create a measurement to insert into the maximum range formula to have it dynamic:

Br1981_1-1707410838579.png

The problem is I don't know to proceed since, it only admit field values:

Br1981_2-1707410886122.png

 

So my idea is to create a table new table grouping all the months and calculating the Market investments for each month but I'm stuck there and I have no idea if that could be a solution...any suggestion?

 

Thanks

 

2 REPLIES 2
Anonymous
Not applicable

Hi @Br1-981 ,

To achieve a consistent Y-axis scale in both charts, you can create a measure to calculate the maximum value to be used as the Y-axis limit. The following is a brief plan of action:

1. you can create a measure that is used to determine the maximum value between two measures in a bar chart. For example:

MaxInvestmentValue = MAXX(ALL(INV), [Market Investment], [Company Investment])

 

2. Use the metric you created as the maximum value for the Y-axis in both bars. To do this, go to the Format pane of each bar chart visualisation, expand the Y-axis section and set the Maximum value to the metric you created.

 

3. Ensure that both bar graphs have the same Y-axis settings for Minimum, Interval, and other properties to ensure that they remain consistent.

 

How to Get Your Question Answered Quickly - Microsoft Fabric Community

If it does not help, please provide more details with your desired out put and pbix file without privacy information.

 

Best Regards,

Ada Wang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Br1-981
Helper I
Helper I

UPDATE: I made in POWER QUERY a new table using the ADVANCED GROUP BY so I calculated for each month the total Spend. At that point I used the field as Maximum into the max of the barchart below:

Br1981_1-1707415781106.png

working also when using filtering:

Br1981_2-1707415834561.png

 

Helpful resources

Announcements
September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Top Solution Authors