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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
JMVandore
New Member

trying to create stacked bar chart showing both positive and negative values

Hello,

I am somewhat new to PowerBI, and am appreciative of any assistance.

I need to have a column chart that shows for each month, counts of people of different categories coming into a group and departing a group. We call it Inflow Outflow. We need to see the counts of people going in, compared with the people going out.

I have been able to do this, by using +1 and -1 for each Inflow and Outflow item respectively.

 

 

 

2019-02-05_13-54-08.jpg

 

As you can see, there is an Inflow column for each month, and an outflow column for each month.

 

If I try to combine both inflow and outflow into one column per month, the numbers are subtracted, not stacked correctly.

 

What I really want is this:

 

2019-02-05_13-54-08.jpg

 

Is this possible in PowerBI? How might I do that?

1 ACCEPTED SOLUTION
v-yulgu-msft
Employee
Employee

Hi @JMVandore,

 


If I try to combine both inflow and outflow into one column per month, the numbers are subtracted, not stacked correctly.

 What I really want is this:

 

2019-02-05_13-54-08.jpg


To show both inflow and outflow into one column bar per month, we have to add "inflow/outflow" as chart legend. However, from the image, it looks like there existing a legend item in chart, it is not allowed to add multiple legend items into a chart. The only workaround is to create an extra column which combines Year-Month with Inflow/OutFlow, add this new column to X-axis, as shown in the first image you posted.

 

Regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-yulgu-msft
Employee
Employee

Hi @JMVandore,

 


If I try to combine both inflow and outflow into one column per month, the numbers are subtracted, not stacked correctly.

 What I really want is this:

 

2019-02-05_13-54-08.jpg


To show both inflow and outflow into one column bar per month, we have to add "inflow/outflow" as chart legend. However, from the image, it looks like there existing a legend item in chart, it is not allowed to add multiple legend items into a chart. The only workaround is to create an extra column which combines Year-Month with Inflow/OutFlow, add this new column to X-axis, as shown in the first image you posted.

 

Regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

wow thanks, I tried that before and it didn't work. this time it did. Thanks much. 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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