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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply

Help creating the following Chart.

So I have a data set that has the following columns:

 

Number, Status, Priority, Date Originated

Status can be "Working", "Pending", "Incorporated"

Priority can be "Yellow", "Orange", or "Red"

 

I want to create a Stacked Column Chart.

How can I create a stacked bar that has "Yellow, Orange, Red" with appropriate counts and a seperate bar next to it that only includes the count of entries with the status "Incorporated"?

Something like this:

Screenshot 2023-02-15 at 7.23.45 AM.png

 

Currently, right now this is what I have and I am having trouble.

Screenshot 2023-02-14 090602.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @powerbinoobster ,

 

As a workaround, you can create a seperate table as follows. I created by entering data.

vstephenmsft_0-1676964348331.png

Then create the following measure, which you can replace and modify it as needed.

Conditional Count = 
VAR _incorporated =
    CALCULATE (
        COUNT ( 'Table'[ID] ),
        FILTER ( ALLSELECTED ( 'Table' ), [Status] = "Incorporated" )
    )
VAR _red =
    CALCULATE (
        COUNT ( 'Table'[ID] ),
        FILTER ( ALLSELECTED ( 'Table' ), [Priority] = "Red" )
    )
VAR _orange =
    CALCULATE (
        COUNT ( 'Table'[ID] ),
        FILTER ( ALLSELECTED ( 'Table' ), [Priority] = "Orange" )
    )
VAR _yellow =
    CALCULATE (
        COUNT ( 'Table'[ID] ),
        FILTER ( ALLSELECTED ( 'Table' ), [Priority] = "Yellow" )
    )
RETURN
    SWITCH (
        SELECTEDVALUE ( 'Table (2)'[Attribute] ),
        "Status", _incorporated,
        "Priority",
            SWITCH (
                SELECTEDVALUE ( 'Table (2)'[Value] ),
                "Red", _red,
                "Orange", _orange,
                "Yellow", _yellow
            )
    )

Sample data:

vstephenmsft_3-1676964466599.png

 

Expected result:

vstephenmsft_1-1676964449544.pngvstephenmsft_2-1676964458598.png

 

You can download my attachment for more details.

 

                                                                                                                                                         

Best Regards,

Stephen Tao

 

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
Anonymous
Not applicable

Hi @powerbinoobster ,

 

As a workaround, you can create a seperate table as follows. I created by entering data.

vstephenmsft_0-1676964348331.png

Then create the following measure, which you can replace and modify it as needed.

Conditional Count = 
VAR _incorporated =
    CALCULATE (
        COUNT ( 'Table'[ID] ),
        FILTER ( ALLSELECTED ( 'Table' ), [Status] = "Incorporated" )
    )
VAR _red =
    CALCULATE (
        COUNT ( 'Table'[ID] ),
        FILTER ( ALLSELECTED ( 'Table' ), [Priority] = "Red" )
    )
VAR _orange =
    CALCULATE (
        COUNT ( 'Table'[ID] ),
        FILTER ( ALLSELECTED ( 'Table' ), [Priority] = "Orange" )
    )
VAR _yellow =
    CALCULATE (
        COUNT ( 'Table'[ID] ),
        FILTER ( ALLSELECTED ( 'Table' ), [Priority] = "Yellow" )
    )
RETURN
    SWITCH (
        SELECTEDVALUE ( 'Table (2)'[Attribute] ),
        "Status", _incorporated,
        "Priority",
            SWITCH (
                SELECTEDVALUE ( 'Table (2)'[Value] ),
                "Red", _red,
                "Orange", _orange,
                "Yellow", _yellow
            )
    )

Sample data:

vstephenmsft_3-1676964466599.png

 

Expected result:

vstephenmsft_1-1676964449544.pngvstephenmsft_2-1676964458598.png

 

You can download my attachment for more details.

 

                                                                                                                                                         

Best Regards,

Stephen Tao

 

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

 

Hello, this works! But do you know why when selecting mutiple months, the visual does not refect those values? For example, when you selected January and February on the slicer, Januarys data gets applied to February's columns and both become identical.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors