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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
mkohler281
Helper I
Helper I

Concatenate number of orders and project manager in a Stacked Bar Chart

I am looking if it's possible to add a total order count by project manager into a stacked bar chart. The stacked bar chart is providing averages for different segments. I've tried several calculated fields to try to concatenate a total order count with a project manager but I am only getting a total count of 1. 

 

Screenshot 2025-02-12 115938.png

 

 

 

 

6 REPLIES 6
Anonymous
Not applicable

Hi,Fowmy ,thanks for your concern about this issue.

Your answer is excellent!
Hello,@mkohler281 .I am glad to help you.
Like this?

vjtianmsft_0-1739505939193.pngvjtianmsft_1-1739505945508.png

Note that when you use horizontal bar stacking charts, the Y-axis field has to be placed with a static dimension field, which means that the field data on the dimension is not able to change according to the computational environment and it cannot be affected by the slicer. (Calculated columns must be placed, not measures)
The calculated column I created:

No_avg = 
VAR _count =
    CALCULATE (
        COUNT ( 'po_header'[PO Number] ),
        ALLEXCEPT ( po_header, 'po_header'[Project Manager] )
    )
VAR _numSegement =
    CALCULATE ( DISTINCTCOUNT ( 'po_header'[Segment] ), ALL ( po_header ) )
RETURN
    FORMAT ( DIVIDE ( _count, _numSegement, 0 ), "0.00" )




Result = 
"(" & [No_avg] & ") " & 'po_header'[Project Manager]


I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Carson Jian,
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

This is excellent but I have three X-Axis values, and no legend, how would this work in that senario?

 

Screenshot 2025-02-17 090117.png

 

Screenshot 2025-02-17 090224.png

Anonymous
Not applicable

Hi,@mkohler281 .Thank you for your reply.
If the three aggregated values that you have placed in the X-axis are measures, 
then you will have to create calculated columns to be placed in the Y-axis of the bar chart as categorized fields.

I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Carson Jian

Fowmy
Super User
Super User

@mkohler281 

What's your DAX formula to get the count?





Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

= "(" & po_header[Count PO] & ") " & po_header[Project Manager]

Count PO = COUNT(po_header[PO Number])

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors