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

Sum Columns

Hello, I am new to Power Bi, and I wanted to see if you could help me solve this problem.

I have a dashboard that I consult from a table that is like this:

idConsultant  C1Support Consultant

SC1

1Juan8 

 

2Pedro4Alex

8

3Charly10Fer

5

4Julio8Alex

4

5Alex6Charly

3

6Pedro7Julio

4

7Juan7Fer

3

Fer5 

 

 

What I am trying to do is, add the occupation of a consultant, it does not matter if it is a regular consultant or a support consultant, you must add the c1 with the of sc1, something like this should remain on a dashboard....

I hope I have explained myself

 

Dashboard Column Chart

151113121813 
JuanPedroCharlyJulioAlexFer 
1 ACCEPTED SOLUTION
v-kkf-msft
Community Support
Community Support

Hi @Anonymous ,

 

Please create a new table.

 

NewTable = 
ADDCOLUMNS (
    DISTINCT (
        UNION ( VALUES ( 'Table'[Consultant] ), VALUES ( 'Table'[Support Consultant] ) )
    ),
    "Sum_C",
        CALCULATE (
            SUM ( 'Table'[C1] ),
            FILTER ( 'Table', 'Table'[Consultant] = EARLIER ( [Consultant] ) )
        )
            + CALCULATE (
                SUM ( 'Table'[SC1] ),
                FILTER ( 'Table', 'Table'[Support Consultant] = EARLIER ( [Consultant] ) )
            )
)

vkkfmsft_0-1655968437217.png

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
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-kkf-msft
Community Support
Community Support

Hi @Anonymous ,

 

Please create a new table.

 

NewTable = 
ADDCOLUMNS (
    DISTINCT (
        UNION ( VALUES ( 'Table'[Consultant] ), VALUES ( 'Table'[Support Consultant] ) )
    ),
    "Sum_C",
        CALCULATE (
            SUM ( 'Table'[C1] ),
            FILTER ( 'Table', 'Table'[Consultant] = EARLIER ( [Consultant] ) )
        )
            + CALCULATE (
                SUM ( 'Table'[SC1] ),
                FILTER ( 'Table', 'Table'[Support Consultant] = EARLIER ( [Consultant] ) )
            )
)

vkkfmsft_0-1655968437217.png

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

amitchandak
Super User
Super User

@Anonymous , Unpivot all 4 columns(last), then use replace value the attribute convert %sc1 to % c1. And the pivot again. you should get two columns

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

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

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.