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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
nish18_1990
Helper II
Helper II

Chart Alignment

Hi, 

 

I need a chart which can show sales on left side and amount on right side . I created below chart with making -ve Sales but the alignment is not correct . They are not coming side by side .

Calculation i used :

Chart is Clustered Bar chart

Sales category = -ABS('Data File'[Sales])

 

nish18_1990_0-1748520603292.png

Is it possible to have both bars allign in one line ?

 

 

Data:

 

CategorySub CategorySalesQuantity Q2countryCreated date
FurnitureChairs10010China22/05/204
FurnitureTables10020China23/05/2025
AutomobileCars10030China21/01/2025
AutomobileBikes70040China21/03/2025
FurnitureChairs10013India21/01/2025
FurnitureTables50022India21/02/2025
AutomobileCars10054India21/01/2025
AutomobileBikes10060India30/01/2025
FurnitureChairs10030China22/01/2025
FurnitureTables30029China23/05/2025
AutomobileCars20088China21/03/2025
AutomobileBikes10022China21/04/2025
FurnitureChairs50021India12/1/2025
FurnitureTables10033India12/1/2025
AutomobileCars60054India21/01/2025
AutomobileBikes10060India30/01/2025
FurnitureChairs10030China22/01/2025
FurnitureTables10029China23/05/2025
FurnitureSofa10088China21/03/2025
FurnitureBed10022China21/04/2025
FurnitureDining10021India12/1/2025
FurnitureTables10033India12/1/2025
FurnitureTables10054India21/01/2025
FurnitureSofa10060India30/01/2025
AutomobileCars100054India21/04/2025
AutomobileBikes10060India30/06/2025
FurnitureChairs10030China22/07/2025
FurnitureTables20029China23/07/2025
FurnitureSofa10088China21/03/2025
FurnitureBed10022China21/04/2025
FurnitureDining10021India12/1/2025
FurnitureTables40033India12/11/2024
FurnitureTables80054India12/10/2024
FurnitureSofa10060India12/11/2024
1 ACCEPTED SOLUTION
v-karpurapud
Community Support
Community Support

Hi @nish18_1990 

 

Welcome to the Microsoft Fabric Forum. Also , thank you @DataNinja777 for your quick response.


Regarding your query on creating a chart to show Sales on the left side and Quantity on the right side. Please try the below measure :

Sales Measure = -SUM('Table'[Sales])  
Quantity Measure = SUM('Table'[Quantity Q2])  


Please refer to the attached screenshot and .PBIX file which demonstrates the correct setup using a Stacked Bar Chart.

vkarpurapud_0-1748586031345.png

 

If this helped solve the issue, please consider marking it “Accept as Solution” and giving a ‘Kudos’ so others with similar queries may find it more easily. If not, please share the details, always happy to help.

Thank you for being part of Fabric Community Forum.

View solution in original post

5 REPLIES 5
v-karpurapud
Community Support
Community Support

Hi @nish18_1990 

I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.

Thank you.

v-karpurapud
Community Support
Community Support

Hi @nish18_1990 

We have not received a response from you regarding the query and were following up to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.

Thank you!

v-karpurapud
Community Support
Community Support

Hi @nish18_1990 

May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.

Thank you.

v-karpurapud
Community Support
Community Support

Hi @nish18_1990 

 

Welcome to the Microsoft Fabric Forum. Also , thank you @DataNinja777 for your quick response.


Regarding your query on creating a chart to show Sales on the left side and Quantity on the right side. Please try the below measure :

Sales Measure = -SUM('Table'[Sales])  
Quantity Measure = SUM('Table'[Quantity Q2])  


Please refer to the attached screenshot and .PBIX file which demonstrates the correct setup using a Stacked Bar Chart.

vkarpurapud_0-1748586031345.png

 

If this helped solve the issue, please consider marking it “Accept as Solution” and giving a ‘Kudos’ so others with similar queries may find it more easily. If not, please share the details, always happy to help.

Thank you for being part of Fabric Community Forum.

DataNinja777
Super User
Super User

Hi @nish18_1990 ,

 

The misalignment in your Clustered Bar Chart is due to the Sales values being made negative while Quantity remains positive. Power BI plots them on opposite sides of the axis, but because they belong to different measures rather than a single shared axis grouped by attribute, they don’t align properly. To fix this, you need to restructure your data using Power Query. Load your dataset, then unpivot the Sales and Quantity Q2 columns so that both values exist under one column named Value with a new column called Attribute indicating whether it's Sales or Quantity.

In Power Query, after selecting the Sales and Quantity Q2 columns, right-click and choose “Unpivot Columns”. This results in a table with Sub Category, Attribute, and Value columns. Next, create a custom column to flip Sales to negative so both measures plot from the same baseline. Use this formula in a custom column:

= if [Attribute] = "Sales" then -[Value] else [Value]

Name the new column Plot Value. Close and apply the query. Then in your Clustered Bar Chart, use Sub Category as the Axis, Attribute as the Legend, and Plot Value as the Value. This will align both bars on the same line, with one extending to the left (Sales) and the other to the right (Quantity), fixing the visual misalignment without having to fake it by manually hardcoding negatives.

 

Best regards,

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.