cancel
Showing results 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

Helper I

## Same axes scale for different bar charts

Hi,

I have 2 bar charts:

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:

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

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
Community Support

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.

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

Best Regards,

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

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:

working also when using filtering:

Announcements

#### Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.