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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
simple_naut26
New Member

100% Stacked bar chart with sum of two columns

Hi, I'm trying to figure out how to visualize two colums by placing the total value of one onto the total value of the other column as a whole. Like below: actual v forecast.png

 When I add the sum of the columns to the visual they add both together for a total of 2000KG where I want it to show as in the above picture. Please help, thanks.

 

2 ACCEPTED SOLUTIONS
v-nuoc-msft
Community Support
Community Support

Hi @simple_naut26


I noticed that the visual you want is not 100% stacked bar chart, here we recommend you to use the stacked bar chart, here is my solution for you:

Here's the raw data I added
vnuocmsft_0-1701335064411.png

First, create new columns to add the actuals and contracted columns

vnuocmsft_1-1701335127901.png

 

total actuals = SUM('Table'[actuals])

 

vnuocmsft_2-1701335144347.png

 

total contracted = SUM('Table'[contracted])

 

vnuocmsft_3-1701335183528.png

 

Next, select stacked bar chart and check New Columns

vnuocmsft_4-1701335229173.png

 

In Format visual, enable Data Labels to display data

vnuocmsft_5-1701335251260.png

 

The final visual is as follows

vnuocmsft_6-1701335274021.png

If you're still having problems, provide some dummy data and the desired outcome. It is best presented in the form of a table.

 

Best Regards,

Nono Chen

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

barritown
Super User
Super User

Hi,

 

@simple_naut26,

 

@v-nuoc-msft has already proposed a solution, but I'll add my two cents here since I've understood the task differently - in my understanding, the second bar should be still 66,6% but captioned differently. 

 

I guess you need to apply custom captions here but unfortunatelly PBI doesn't allow to place them outside the bar.

 

First, create those captions via measures:

Caption 1 = SUM ( 'Table'[Actuals] )

Caption 2 = SUM ('Table'[Actuals] ) + SUM ('Table'[Contracted] )

 

And then apply via the menu @v-nuoc-msft already mentioned:

 

barritown_0-1701336386399.png

 

Best Regards,

Alexander

My YouTube vlog in English

My YouTube vlog in Russian

 

View solution in original post

2 REPLIES 2
barritown
Super User
Super User

Hi,

 

@simple_naut26,

 

@v-nuoc-msft has already proposed a solution, but I'll add my two cents here since I've understood the task differently - in my understanding, the second bar should be still 66,6% but captioned differently. 

 

I guess you need to apply custom captions here but unfortunatelly PBI doesn't allow to place them outside the bar.

 

First, create those captions via measures:

Caption 1 = SUM ( 'Table'[Actuals] )

Caption 2 = SUM ('Table'[Actuals] ) + SUM ('Table'[Contracted] )

 

And then apply via the menu @v-nuoc-msft already mentioned:

 

barritown_0-1701336386399.png

 

Best Regards,

Alexander

My YouTube vlog in English

My YouTube vlog in Russian

 

v-nuoc-msft
Community Support
Community Support

Hi @simple_naut26


I noticed that the visual you want is not 100% stacked bar chart, here we recommend you to use the stacked bar chart, here is my solution for you:

Here's the raw data I added
vnuocmsft_0-1701335064411.png

First, create new columns to add the actuals and contracted columns

vnuocmsft_1-1701335127901.png

 

total actuals = SUM('Table'[actuals])

 

vnuocmsft_2-1701335144347.png

 

total contracted = SUM('Table'[contracted])

 

vnuocmsft_3-1701335183528.png

 

Next, select stacked bar chart and check New Columns

vnuocmsft_4-1701335229173.png

 

In Format visual, enable Data Labels to display data

vnuocmsft_5-1701335251260.png

 

The final visual is as follows

vnuocmsft_6-1701335274021.png

If you're still having problems, provide some dummy data and the desired outcome. It is best presented in the form of a table.

 

Best Regards,

Nono Chen

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

 

 

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.