Forum Discussion

Razorbx13's avatar
Razorbx13
Icon for Post Patron rankPost Patron
5 years ago
Solved

Gross Margin %

I need to calculate a Gross Margin in a Matrix visual.  I have the dollar correct but the % I do not.  It is showing 100%. Can someone help me?  Thanks!  See example below.

 

Revenue1200100%Correct
   Account 180067%Correct
   Account 240033%Correct
Cost of Goods Sold900100%Correct
   Account 345050%Correct
   Account 445050%Correct
Gross Margin300100%Incorrectly calculating. S/B 25%
  • Hi Razorbx13

     

    Try to create calculate column and apply the Formula:

    MTD Actual %1 =
    DIVIDE(
    [MTD Actual],
    CALCULATE (
    [MTD Actual],
    ALL ( 'GL Transactions (Statement of Operations)'[Account Full Description] )
    ))

     You can refer this about difference between measure and calculate column:

     

    Best Regards,

    Link

     

    If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

     

3 Replies

  • Ashish, that you for responding.  Is there a way to share the file without data as it is confidential.  What I have is a Gross Margin calculation of:

     

    Gross Margin (SO) = CALCULATE ( SUM ( 'GL Transactions (Statement of Operations)'[Original Amount (Revised)] ), 'GL Transactions (Statement of Operations)'[Account Group] = "Revenue" ) - CALCULATE ( SUM ( 'GL Transactions (Statement of Operations)'[Original Amount (Revised)] ), 'GL Transactions (Statement of Operations)'[Account Group] = "Cost of Sales" )
     
    And this works.  Now my % calculation is below and it is used to show % for each subtotal of row but it is showing 100% for Gross Margin as noted in the image.
     
    MTD Actual % =
    DIVIDE(
    [MTD Actual],
    CALCULATE (
    [MTD Actual],
    ALL ( 'GL Transactions (Statement of Operations)'[Account Full Description] )
    ))
     
     
  • v-xulin-mstf's avatar
    v-xulin-mstf
    Icon for Community Support rankCommunity Support

    Hi Razorbx13

     

    Try to create calculate column and apply the Formula:

    MTD Actual %1 =
    DIVIDE(
    [MTD Actual],
    CALCULATE (
    [MTD Actual],
    ALL ( 'GL Transactions (Statement of Operations)'[Account Full Description] )
    ))

     You can refer this about difference between measure and calculate column:

     

    Best Regards,

    Link

     

    If this post helps then please consider Accept it as the solution to help the other members find it more quickly.