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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

Make the % of the value in comparison to the Total of that year

Hello! 

 

I'm pretty new with PowerBi and found realtively easily answers to my different questions. But now I'm stuck.

 

I have a whole list of different countries summarizing the value of exported goods and services depending of the year.

 

For example:

Germany / 2013 / 67385 M euros

Bahamas / 2014 / 25 M euros

And so on ...2019-07-10 13_35_57-Etude Pays v2 - Power BI Desktop (May, 2019).png

 

I would like to create a new column which gives the percentage in comparison to the total of that year

 

For example; if 2014 had 100 M euros in total of exported goods and services, Bahamas would represent 25%.

But I can't seem to find a formula that can make a division (Value / SUM(Values)) depending on the year. It usually takes all the values, whichever the year is..

 

Thanks in advance!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Thanks for your help! Even when I did a measure, it didn't want to apply it to the whole dataset, only to the selected values. So I made a workaround.

 

I created anothe table whick makes a group by (sum) of the values of each year. Afterwards I divide the value by the total number of that year (by using a lookupvalue).

 

View solution in original post

8 REPLIES 8
mussaenda
Super User
Super User

Hi,

 

On the values, we can select this one so it can display the GT %

 

2019_07_10_15_47_41_Logistics_Power_BI_Desktop.png

Anonymous
Not applicable

Hey mussaenda! Thanks for your quick answer, but the thing is, it only calculates the % based on the filtered values of the dashboard.

 

If I select 5 countries, it will show a percentage based on these countries. I want it to be based on all the years, whichever country I select in the dashboard.

% of Grand Total =
DIVIDE (
SUM ( Value Biens (M Euro) ),
CALCULATE ( SUM ( Value Biens (M Euro) ), ALL ( 'Table1'[TIME]  ) )
)

I see, I get you.

You may want to try this one.

Anonymous
Not applicable

Thanks! Tried it and I get various numbers which are too high to be percentages.

 

Can I have some explanation about the formula? I'm kinda lost  Smiley Very Happy

You may want to check this thread.

 

Sorry, instead of TIME column, please use the Partner Name column.

 

2019_07_10_16_22_11_Untitled_Power_BI_Desktop.png

2019_07_10_15_47_41_Logistics_Power_BI_Desktop.png

This is what you need, right?

if not, please provide more info for testing.

Thank you

Anonymous
Not applicable

The table you provided is exactly what I'm looking for. But the formula doesn't give the same result..

This is what I have: 

This is with PartnerName

2019-07-10 14_36_22-Etude Pays v2 - Power BI Desktop (May, 2019).png

 

This is with TIME2019-07-10 14_35_44-Etude Pays v2 - Power BI Desktop (May, 2019).png

Sorry @Anonymous, it works with a measure.

Anonymous
Not applicable

Thanks for your help! Even when I did a measure, it didn't want to apply it to the whole dataset, only to the selected values. So I made a workaround.

 

I created anothe table whick makes a group by (sum) of the values of each year. Afterwards I divide the value by the total number of that year (by using a lookupvalue).

 

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.