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

Calculate Percentage

Hi, I am new to Power BI, can someone help me with calculating the percentage with the symbol % in it I have the below data, for which I have to find the total sum and display it in the percentage value.

 

Percent
10
20
10
20
15
5
10
5
5

 

 

Thanks, Ravi

1 ACCEPTED SOLUTION
v-huizhn-msft
Employee
Employee

Hi @Anonymous,

You want to calculte the percentage of each value verse total value? For example, 10/(10+20+10+20+15+5+10+5+5), right? If it it, please create a calculated column using the following formula, and see the result shown in the following screenshot.

Percentage = Test11[Percent]/CALCULATE(SUM(Test11[Percent]),ALL(Test11[Percent]))


Capture51.PNG


Best Regards,
Angelia


View solution in original post

7 REPLIES 7
frugData
New Member

Can you help me to reduce the decimal, my operation is 89.12457831484 %, only I want to have 2 decimal.

 

 

thanks!!

v-huizhn-msft
Employee
Employee

Hi @Anonymous,

You want to calculte the percentage of each value verse total value? For example, 10/(10+20+10+20+15+5+10+5+5), right? If it it, please create a calculated column using the following formula, and see the result shown in the following screenshot.

Percentage = Test11[Percent]/CALCULATE(SUM(Test11[Percent]),ALL(Test11[Percent]))


Capture51.PNG


Best Regards,
Angelia


Anonymous
Not applicable

Thanks Angelia, I have one more requirement though where I have to add (1+2+3+4+5)=15 and I have to dispay it as 15%

I tried to append "%" symbol in the end, but it dosent sums it after that (considering it as a string).

 

Thanks,

Ravi

You should be able to just add an & operator to achieve this.

 

Measure = CALCULATE(
					SUM('Table1'[Column1])
					) & "%"

To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

Anonymous
Not applicable

Thanks a lot, it works 🙂

Hi @Anonymous,

Please mark the corresponding reply as answer, which will help more people find solution.

Best Regards,
Angelia

Greg_Deckler
Super User
Super User

In the Modeling tab, you can set a column to %. In your case, you may have to divide by 100.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

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.