Forum Discussion

8125551478's avatar
8125551478
Frequent Visitor
3 years ago

Calculate % Difference

Hi,
Kindly sugest the below problem statement.

 calculate % Difference  with other countys (when compair total sales of india to other counters ,How much of % difference is coming )

 

CountryStateSales Amount
IndiaHyderabad150014
IndiaDelhi185405
IndiaMumbai220796
USGeorgia125405
USMexico145405
USNew York165405
UKEngland120245
UKScotland169875
UKIreland168472

 

 

2 Replies

  • rajulshah's avatar
    rajulshah
    Resident Rockstar

    8125551478 

     

    Please try following:

    % Difference = 
    VAR Sales =
        SUM ( '% Difference'[Sales Amount] )
    VAR TotalSales =
        CALCULATE (
            SUM ( '% Difference'[Sales Amount] ),
            ALL ( '% Difference'[Country] )
        )
    RETURN
        DIVIDE ( Sales, TotalSales )

     

    I am getting the following results.

    Hope this helps.

    • 8125551478's avatar
      8125551478
      Frequent Visitor

      Thanks, I need % difference when compari to india total sales  (like 20% High when compaired to India total sales)