The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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
Is it possible to have both bars allign in one line ?
Data:
Category | Sub Category | Sales | Quantity Q2 | country | Created date |
Furniture | Chairs | 100 | 10 | China | 22/05/204 |
Furniture | Tables | 100 | 20 | China | 23/05/2025 |
Automobile | Cars | 100 | 30 | China | 21/01/2025 |
Automobile | Bikes | 700 | 40 | China | 21/03/2025 |
Furniture | Chairs | 100 | 13 | India | 21/01/2025 |
Furniture | Tables | 500 | 22 | India | 21/02/2025 |
Automobile | Cars | 100 | 54 | India | 21/01/2025 |
Automobile | Bikes | 100 | 60 | India | 30/01/2025 |
Furniture | Chairs | 100 | 30 | China | 22/01/2025 |
Furniture | Tables | 300 | 29 | China | 23/05/2025 |
Automobile | Cars | 200 | 88 | China | 21/03/2025 |
Automobile | Bikes | 100 | 22 | China | 21/04/2025 |
Furniture | Chairs | 500 | 21 | India | 12/1/2025 |
Furniture | Tables | 100 | 33 | India | 12/1/2025 |
Automobile | Cars | 600 | 54 | India | 21/01/2025 |
Automobile | Bikes | 100 | 60 | India | 30/01/2025 |
Furniture | Chairs | 100 | 30 | China | 22/01/2025 |
Furniture | Tables | 100 | 29 | China | 23/05/2025 |
Furniture | Sofa | 100 | 88 | China | 21/03/2025 |
Furniture | Bed | 100 | 22 | China | 21/04/2025 |
Furniture | Dining | 100 | 21 | India | 12/1/2025 |
Furniture | Tables | 100 | 33 | India | 12/1/2025 |
Furniture | Tables | 100 | 54 | India | 21/01/2025 |
Furniture | Sofa | 100 | 60 | India | 30/01/2025 |
Automobile | Cars | 1000 | 54 | India | 21/04/2025 |
Automobile | Bikes | 100 | 60 | India | 30/06/2025 |
Furniture | Chairs | 100 | 30 | China | 22/07/2025 |
Furniture | Tables | 200 | 29 | China | 23/07/2025 |
Furniture | Sofa | 100 | 88 | China | 21/03/2025 |
Furniture | Bed | 100 | 22 | China | 21/04/2025 |
Furniture | Dining | 100 | 21 | India | 12/1/2025 |
Furniture | Tables | 400 | 33 | India | 12/11/2024 |
Furniture | Tables | 800 | 54 | India | 12/10/2024 |
Furniture | Sofa | 100 | 60 | India | 12/11/2024 |
Solved! Go to Solution.
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.
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.
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.
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!
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.
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.
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.
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,
User | Count |
---|---|
28 | |
12 | |
8 | |
7 | |
5 |
User | Count |
---|---|
36 | |
14 | |
12 | |
7 | |
7 |