Forum Discussion

hung0902's avatar
hung0902
New Member
9 years ago

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

  • 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

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    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.

     

     

    • hung0902's avatar
      hung0902
      New Member

      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.

      • Greg_Deckler's avatar
        Greg_Deckler
        Community Champion

        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.