Forum Discussion

espinozan's avatar
espinozan
Icon for Helper I rankHelper I
9 years ago
Solved

Gross Margin Average

Hello,

 

I'm trying to have a Card visual in my report that has the average percent of GM across all products. I currently have a measure that calculates GM. How can I have the Card visual show the average? Do I have to create a new measure? Or should it already be showing the average by default? Thank you for your help.

% GM = ((SUM(SAPdata[Total Revenue NBT])-
SUM(SAPdata[Cost Sales Total]))/
SUM(SAPdata[Total Revenue NBT]))

Best.

  • Hi espinozan,

     

    If there is no any Slicers/Filters applied on your report, then the formula you provided above will calculates GM across all products. Or it will be calculated under the selected data.

     

    To ignore all filters, and always calculates GM across all products, the formula below is for your reference. :smileyhappy:

    % GM =
    CALCULATE (
        DIVIDE (
            SUM ( SAPdata[Total Revenue NBT] ) - SUM ( SAPdata[Cost Sales Total] ),
            SUM ( SAPdata[Total Revenue NBT] )
        ),
        ALL ( SAPdata )
    )
    

    Regards

1 Reply

  • v-ljerr-msft's avatar
    v-ljerr-msft
    Icon for Microsoft Employee rankMicrosoft Employee

    Hi espinozan,

     

    If there is no any Slicers/Filters applied on your report, then the formula you provided above will calculates GM across all products. Or it will be calculated under the selected data.

     

    To ignore all filters, and always calculates GM across all products, the formula below is for your reference. :smileyhappy:

    % GM =
    CALCULATE (
        DIVIDE (
            SUM ( SAPdata[Total Revenue NBT] ) - SUM ( SAPdata[Cost Sales Total] ),
            SUM ( SAPdata[Total Revenue NBT] )
        ),
        ALL ( SAPdata )
    )
    

    Regards