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

How do I create a percentage column?

I have a report with Total AMount by Channel. I have a sum of Total Amount. How do I create a column that calculate percentage of total amount of each Channel by sum of Total Amount.

4 REPLIES 4
Greg_Deckler
Super User
Super User

That is going to be somewhat dependent on your data. If you have a table with all of the Channel's and you have a measure with the sum of Total Amount (TotalAmount), then you could do a custom column like this:

 

Channel% = CALCULATE(SUM(Sales[Amount]),RELATEDTABLE(Sales))/[TotalAmount])

Something along those lines, but is going to be dependent on your specific data. This assumes that you have a Channel table that lists your channels that is related to a Sales table that has your sales in it.

 

 


@ 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...

I am struggling with the right syntax. Attached is the report snapshot. Total Amount is the calculated field i created. you can see the one i'm showing at the lower left corner. I imagine that the percentage column will be to the right of Channel Name. Can you guys let me know the right syntax? I've tried many times but failed to get the correct ones.pyco4.png

In your case, you should be able to just use a Quick Measure, % of Total. In your field list for your visual, click the drop down and select Quick Measure.


@ 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...
anupampandey
Helper III
Helper III

Hi,

 

Create a measure: 

 

Percentage of Total = Total Amount by Channel / Sum(Total Amount by Channel)

 

Hope this will work or else you can share some sample data.

 

Thanks,

Anupam

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.