cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
TatyDo
Helper III
Helper III

Measure of percentage of grand total

Percentage of grand total.png

 

Hallo,

 

Could you please help me with a simple measure to calculate the percentage of each fraction, as it in the last column? 

 

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

Hi, @TatyDo 

 

You may use the following measure.

 

Result = 
DIVIDE(
    SUM('Table'[Value]),
    CALCULATE(
        SUM('Table'[Value]),
        ALLSELECTED('Table')
    )
)

 

 

Result:

a1.png

a2.png

a3.png

 

Best Regards

Allan

 

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

9 REPLIES 9
Ashish_Mathur
Super User
Super User

Hi,

Assuming Value is a measure that you have written, try this measure

=[Value]/CALCULATE([Value],ALL(Data[ID]))

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
v-alq-msft
Community Support
Community Support

Hi, @TatyDo 

 

Based on my research, you may create a measure as follows.

 

Result = 
DIVIDE(
    SUM('Table'[Value]),
    CALCULATE(
        SUM('Table'[Value]),
        ALL('Table')
    )
)

 

or

 

Result2 = 
SUMX(
    'Table',
    DIVIDE(
        'Table'[Value],
        CALCULATE(
            SUM('Table'[Value]),
            ALL('Table')
        )
    )
)

 

 

Then you may make the measure selected, go to 'Modeling' ribbon, click '%' and set 'Decimal places' as 0.

a1.png

 

Result:

a2.png

 

Best Regards

Allan

 

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

 

 

@v-alq-msft 

Thank you for your answer.

 

The only problem I am having is that the value is not responding to the filters. You can see below what I mean. 

Percentage value.png

v-alq-msft
Community Support
Community Support

Hi, @TatyDo 

 

You may use the following measure.

 

Result = 
DIVIDE(
    SUM('Table'[Value]),
    CALCULATE(
        SUM('Table'[Value]),
        ALLSELECTED('Table')
    )
)

 

 

Result:

a1.png

a2.png

a3.png

 

Best Regards

Allan

 

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

Thank you! 🙂

amitchandak
Super User
Super User

Try like

divide(sum(table[Value]),calculate(sum(table[Value]),all(Table)))

 

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!! !!
Dashboard of My Blogs !! Connect on Linkedin

Learn Power BI Beginners !! Advance Power BI Concepts !! Power BI For Tableau User !! Learn Power BI in Hindi !!
Proud to be a Super User!
Greg_Deckler
Super User
Super User

The above is for a Table visualization.

 

If you need a column in a table:

Column = DIVIDE([Value],SUMX('Table',[Value]),0)

 


@ me in replies or I'll lose your thread!!!
Check out my External Tool for Power BI Desktop! Microsoft Hates Greg's Quick Measures
YouTube Channel! Microsoft Hates Greg
Check out my latest book!

az38
Super User
Super User

Hi @TatyDo 

try a measure

Measure = 
DIVIDE( SELECTEDVALUE(Table[Value]),
CALCULATE(SUM(Table[Value]), ALL(Table))
)

or just set parameter "Show value as - Percent of Grand Total" in visual value settings 

 


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn
Greg_Deckler
Super User
Super User

In the Values area, click the drop down and then Show As and then Percent of ...

 


@ me in replies or I'll lose your thread!!!
Check out my External Tool for Power BI Desktop! Microsoft Hates Greg's Quick Measures
YouTube Channel! Microsoft Hates Greg
Check out my latest book!

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

November Power BI Update 768x460.png

Check it Out!

Click here to read more about the November 2021 Updates!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.