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
stvesanity
Frequent Visitor

Stacked bar difference to be shown as line graph

Hi, 

 

Need your expertise, please.

 

I'm trying to show the difference between two bars in my clustered bar chart -- the result will be added as line chart or any recommendation as to how to show it is welcome. 

 

is it possible?

 

orange - total hours

blue - forecasted hours

stvesanity_0-1610633276424.png

 

1 ACCEPTED SOLUTION
v-alq-msft
Community Support
Community Support

Hi, @stvesanity 

 

Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.

Table:

b1.png

 

You may create a measure as below.

Diff = SUM('Table'[Total Hours])-SUM('Table'[Forecasted Hours])

 

 

Then you may display the result with 'Line and clustered column chart'.

b2.png

 

Best Regards

Allan

 

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

7 REPLIES 7
v-alq-msft
Community Support
Community Support

Hi, @stvesanity 

 

Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.

Table:

b1.png

 

You may create a measure as below.

Diff = SUM('Table'[Total Hours])-SUM('Table'[Forecasted Hours])

 

 

Then you may display the result with 'Line and clustered column chart'.

b2.png

 

Best Regards

Allan

 

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

stvesanity
Frequent Visitor

@PaulDBrown  hey Paul, would it be okay to seek for your assistance about this as well? Appreciate your help

amitchandak
Super User
Super User

apologies if i was unclear 

 

the forecasted hours (188 = total for the month and it's 37.5 = week)

 

prob is, 

 

1. i'm always subtracting it to 188

2. i have 1 filtered item in forecasted hours (not included as forecasted hours in my raw) 

3. related to 2nd item, if i'm directly running what you have provided (forecast hr)-(actual hr) my concern in 2nd item is also included

 

sorry for being pain

@stvesanity 

 

@stvesanity 

If you include a filter in the filter pane, the corresponding table will be filtered accordingly for all the measures you include in the visual. So if you exclude a value, the measures will compute the result excluding the value you have filtered.

Having said that, as @amitchandak  suggests, the best way to undertsand the potential problem is to see an actual example, as in a sample PBIX file or a sample dataset (without sensitive data of course) with the measures and expected output. (You can upload and share these in a cloud service such as Onedrive, Google Drive, Dropbox...)

It´s hard to understand what the issue is from the images you have posted.





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






@stvesanity ,Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

@amitchandak 

 

here it goes -- appreciate your help

 

2nd screenshot is the 

 

value = hours spent/task

column = expected hours/wk  and expected hours/month

 

stvesanity_1-1610636260217.pngstvesanity_2-1610636314993.png

 

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.