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

percentage of column grand total

i want to calculate % of grand total, for the purpose my 2 measures are as below, the column "primary pct" is showing 100% for all the rows as screemshot below:

 

primary sum = SUM('Budget Detail'[Sub-Total])
----- 
primary pct = 
VAR CurrentPrimarySum = [primary sum]
VAR AllPrimarySum = 
    CALCULATE(
        [primary sum],
        ALL( 'Budget Detail' )
    )
RETURN
    DIVIDE( CurrentPrimarySum, AllPrimarySum )

 

while my searching i found the following topic and created formula by @Vvelarde but it is also showing 100%

Topic Link 

 

% of Grand Total =
DIVIDE (
    SUM ( 'Budget Detail'[Sub-total] ),
    CALCULATE ( SUM ( 'Budget Detail'[Sub-total] ), ALL ( 'Budget Detail' ) )
)

 

Core2Plus_0-1626342717060.png

what can be wrong here? please guide to help.

regards

1 ACCEPTED SOLUTION

Hi @Anonymous ,

 

In field formatting, select the %column:

 

Capture21.PNG

 

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

 

Best Regards,

Dedmon Dai

View solution in original post

5 REPLIES 5
v-deddai1-msft
Community Support
Community Support

Hi @Anonymous ,

 

Select the measure and click the %:

 

Capture13.PNG

 

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

 

Best Regards,

Dedmon Dai

Anonymous
Not applicable

@v-deddai1-msft 

this is for a Measure, what i asked is different.

when we use for a column/measure in visual and set it to Show value as -> % of grand total it is only showing 2 decimal places, i can't change it.

regards

Hi @Anonymous ,

 

In field formatting, select the %column:

 

Capture21.PNG

 

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

 

Best Regards,

Dedmon Dai

amitchandak
Super User
Super User

@Anonymous , formula is fine, can you share pbix.

 

Anonymous
Not applicable

thanks @amitchandak for your interest to help us, but its not possible for me because of restriction at work.

i have used feature to show value as % of grand total , its working fine but i can't format it as per requirement which shows in screenshot below ( required is in single decimal )

if you can help in this matter i will be much grateful.

Core2Plus_0-1626348625687.png

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.