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
WaleedAli
New Member

Calculate Percentage using only one column which has all values

Hi,
Hope you all are doing well
I have a column which includes total revenue and all the other fields e.g total project cost, project indirect cost and others these all are in one column as shown in image below. How can i calculate percentage of all the fields in that column out of total revenue which is also in that column as you can see in image.
alittle help required! Thanks in advance.

 

 

 

Expense.PNG

4 REPLIES 4
Ashish_Mathur
Super User
Super User

Hi,

Does this measure work?

Measure = sum(Data[Total])

Measure 2 = divide([Measure],calculate([Measure],Data[Expense]="Revenue"))

Format Measure 2 as a %.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
danextian
Super User
Super User

Hi @WaleedAli 

 

Try this:

percent =
DIVIDE (
    SUM ( Table[Value] ),
    CALCULATE (
        SUM ( Table[Value] ),
        FILTER ( ALL ( Table[Expense] ), Table[Expense] = "Total Revenue" )
    )//to divide the sum for each item in Expense over Total Revenue
)









Did I answer your question? Mark my post as a solution!


Proud to be a Super User!









"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

@danextian Hi, i appreciate your effort.
But it is still not working.
I have carried out total revenue value from column. But when i put that value in DIVIDE function it don't print out all the percentages of the remain field out of total revenue. Alittle help needed thanks.percentage.PNGpercentagecode.PNG

Hi @WaleedAli ,

 

What do you mean by the percentages of the remain field out of total revenue?

Also please share a sample data that we can easily manipulate - not an image.










Did I answer your question? Mark my post as a solution!


Proud to be a Super User!









"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

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.