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
MaxSchrijen23
Helper I
Helper I

Total column to clustered chart

I am trying to create a column chart that contains the separate values for my series and one column that contains the total value of all my series summed together. 

My data is a project table containing the project name, status and a team it belongs to. Now I want to create a column chart that counts the amount of projects per status per team, but at the same time also show a column with the total of all the projects for this status. It should look like this:

MaxSchrijen23_0-1640339633567.png

 

Does anybody know how to do this?

 

Thanks in advance!

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

Hi @MaxSchrijen23 ,

 

I think you are going to add a total column to the clustered column chart.

 

Here's my solution.

Sample data

vstephenmsft_0-1640598056553.png

 

1.Create a table as follows(Enter data). If you have a lot of values and it is not convenient to enter them directly, please let me know.

vstephenmsft_1-1640598077173.png

There's no relationship.

vstephenmsft_2-1640598111554.png

 

 

2.Create a measure.

Measure =
IF (
    MAX ( 'Table (2)'[ID] ) = "Total",
    CALCULATE (
        SUM ( 'Table'[Value] ),
        FILTER ( ALLSELECTED ( 'Table' ), [Year] = MAX ( 'Table'[Year] ) )
    ),
    CALCULATE (
        SUM ( 'Table'[Value] ),
        FILTER ( 'Table', [ID] = MAX ( 'Table (2)'[ID] ) )
    )
)

 

3.Results.

vstephenmsft_3-1640598191691.png

 

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

4 REPLIES 4
v-stephen-msft
Community Support
Community Support

Hi @MaxSchrijen23 ,

 

I think you are going to add a total column to the clustered column chart.

 

Here's my solution.

Sample data

vstephenmsft_0-1640598056553.png

 

1.Create a table as follows(Enter data). If you have a lot of values and it is not convenient to enter them directly, please let me know.

vstephenmsft_1-1640598077173.png

There's no relationship.

vstephenmsft_2-1640598111554.png

 

 

2.Create a measure.

Measure =
IF (
    MAX ( 'Table (2)'[ID] ) = "Total",
    CALCULATE (
        SUM ( 'Table'[Value] ),
        FILTER ( ALLSELECTED ( 'Table' ), [Year] = MAX ( 'Table'[Year] ) )
    ),
    CALCULATE (
        SUM ( 'Table'[Value] ),
        FILTER ( 'Table', [ID] = MAX ( 'Table (2)'[ID] ) )
    )
)

 

3.Results.

vstephenmsft_3-1640598191691.png

 

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.

 

Thanks for your answer, this helped!

mahoneypat
Employee
Employee

You may need to use the Charticulator visual for this one, but should be doable (and free).

(15) Austin Power BI User Group - Charticulator 101 - YouTube

 

But even easier would be to use a line and clustered column chart (one of the native visuals) and put your measure also as the line values too.

 

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


radhey_rec
Resolver II
Resolver II

Hi @MaxSchrijen23 ,

 

I am not sure you can do that in Power BI. Please check.

 

In case you fail to create it with the native power bi visuals, you can try custom visual that I am able to create with https://pbivizedit.com visual generation service. You can download pbix and custom visual file from the below link to verify if this satisfies you need:

https://pbivizedit.com/gallery/2255098

 

Given the data

TeamStatusCountColor (this is calculated Field based on team)
Team 1Active9#01b8aa
Team 1WIP3#01b8aa
Team 1Finished6#01b8aa
Team 1Canceled2#01b8aa
Team 2Active7#374649

...

with the above visual, I am able to generate following chart:

 

radhey_rec_1-1640356972176.png

 

Thanks,

-R

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.