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

100% Stacked Bar Chart with 2 calculations (count this period, count last period) in the axis

Good afternoon,

 

This seems harder than it should be and I have tried all sorts of table transformations and still can't make it work.

 

image.png

 

Above is a 100% stacked bar chart showing sentiment of contact by territory. I want to recreate this but show sentiment for this period.

 

A simplified version of my data looks like:

 

Ref Number | Date         | Territory | Sentiment | 

 00454-0001 | 22/01/19 | GB          | Positive 

 00443-0011 | 22/01/19 | GB          | Negative 

 00454-0004 | 22/01/19 | GB          | Neutral 

 

I have a calculated field for

 

CountofRef = count(Ref Number) 

Last Month = CALCULATE([CountofRef], PREVIOUSMONTH(Dates[Date]))

 

I can't drop 2 calculations into the value so I tried grouping and merging a table.

 

Date | Territory | Sentiment -> Group by all 3 and count rows -> Add new column (date last month) -> merge queries to add new count of date last month. 

 

I end up with something like; 

 

image.png

 

even when I unpivot I am unable to recreate the effect I want.

 

Can anyone help?

 

Thanks

 

Nick

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

Hi @NDYKES 

Do you want to get a visual like this

2.png

If so, it seems not possible to create a Combination of Stacked and Column Chart currently.

A workaround described in the link below:

https://community.powerbi.com/t5/Desktop/Double-Stacked-Column-Chart-Combination-of-Stacked-and-Colu...

 

Best Regards
Maggie

 

Community Support Team _ Maggie Li
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-juanli-msft
Community Support
Community Support

Hi @NDYKES 

Do you want to get a visual like this

2.png

If so, it seems not possible to create a Combination of Stacked and Column Chart currently.

A workaround described in the link below:

https://community.powerbi.com/t5/Desktop/Double-Stacked-Column-Chart-Combination-of-Stacked-and-Colu...

 

Best Regards
Maggie

 

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

Thanks, that worked

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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

MayPowerBICarousel

Power BI Monthly Update - May 2024

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.