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
rommel20
Resolver I
Resolver I

Percentage within Percentage

Hi,

 

is there any way i can create Percentage withn Percentage for e.g

 

Group       Percentage

Teacher      5%

Engineer     90%

Programmer 5%

 

if i selected teacher i will show the percentage based on Group Percentage

 

Subgroup                  Percentage

Math Teacher             3%

English Teacher           1.5%

Science Teacher           1.5%

 

I used this first formula in Group

% Value = DIVIDE(SUM(Value),CALCULATE(SUM(Value]),ALL(Group)))

 

1 ACCEPTED SOLUTION
v-sihou-msft
Employee
Employee

@rommel20

 

According to your description, you want to calculate the percentage of parent when drilling down to child level. Right? 

 

In this scenario, you have to specify different column as filter in CALCULATE(). It can be like: 

 

% Value =
IF (
    HASONEVALUE ( Table[SubGroup] ),
    DIVIDE (
        SUM ( Tble[Value] ),
        CALCULATE ( SUM ( Table[Value] ), ALL ( Table[SubGroup] ) )
    ),
    DIVIDE (
        SUM ( Tble[Value] ),
        CALCULATE ( SUM ( Table[Value] ), ALL ( Table[Group] ) )
    )
)

Please refer to article below: 

PowerPivot: Calculate ratio to parent

 

Regards,

 

View solution in original post

1 REPLY 1
v-sihou-msft
Employee
Employee

@rommel20

 

According to your description, you want to calculate the percentage of parent when drilling down to child level. Right? 

 

In this scenario, you have to specify different column as filter in CALCULATE(). It can be like: 

 

% Value =
IF (
    HASONEVALUE ( Table[SubGroup] ),
    DIVIDE (
        SUM ( Tble[Value] ),
        CALCULATE ( SUM ( Table[Value] ), ALL ( Table[SubGroup] ) )
    ),
    DIVIDE (
        SUM ( Tble[Value] ),
        CALCULATE ( SUM ( Table[Value] ), ALL ( Table[Group] ) )
    )
)

Please refer to article below: 

PowerPivot: Calculate ratio to parent

 

Regards,

 

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.