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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
Anonymous
Not applicable

Calculate percentage based on multiple rows of table

I have summarized table that I created through DAX from direct query table. It look like:

NameEffort in daysTeam
XYX51
XYX32
ABC31
ABC22

I need to create another column that tells me how much % of effort(of the total effort spent) a person spent in the team. So the output would look like:

NameEffort in daysTeamPercent
XYX5163%
XYX3238%
ABC3160%
ABC2240%

 

I am fairly new to Power BI, please help.

 

Thanks

Anuj

1 ACCEPTED SOLUTION
Jos_Woolley
Solution Sage
Solution Sage

Hi,

=
DIVIDE(
    [Effort in days],
    CALCULATE(
        SUM( [Effort in days] ),
        ALLEXCEPT(
            Table1,
            Table1[Name]
        )
    )
)

Regards

View solution in original post

6 REPLIES 6
Jos_Woolley
Solution Sage
Solution Sage

Hi,

=
DIVIDE(
    [Effort in days],
    CALCULATE(
        SUM( [Effort in days] ),
        ALLEXCEPT(
            Table1,
            Table1[Name]
        )
    )
)

Regards

 

 

Percent = 
DIVIDE(
    SUM('Table'[Effort in days]),
    CALCULATE(
        SUM('Table'[Effort in days]),
        ALLEXCEPT(
            'Table',
            'Table'[Name]
        )
    )
)

 

 

This is a Calculated Column, not a Measure, so it's not necessary to apply an aggregation to the Effort in days column in this case. 

Regards

Oh okay, so that is why. You made a calculated column while I was making a calculated measure. Sorry for the unnecessary reply. I would delete it if I had the option to.

Regards,
Aditya

Hi Aditya,

"Fix" seems a touch strong! 🙂

From what I understand, the use of fully qualified references to columns within the same table is only "recommended" practice, not obligatory. As such, I would have to disagree that your version constitutes a 'fix' of mine.

Regards

Anonymous
Not applicable

Thanks a lot for quick solution

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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

Top Solution Authors