Forum Discussion

Julia_Mav's avatar
Julia_Mav
Helper II
2 years ago
Solved

100% = Country

Hi, could someone help me find the way to calculate the percentage of sales for each product category, where 100% represents different countries? 

 

Thanks!

 

 

 

  • Something like this might work for you.

    % OF Country Sales = 
    var _countrySales = 
    CALCULATE(
        SUM('Table'[Value]),
        ALLEXCEPT('Table', 'Table'[Country])
    )
    Return
    DIVIDE(
        SUM('Table'[Value]),
        _countrySales,
        0
    )

    You can replace the 'Table' with your table name and the SUM('Table'[Value]) with the table/column from your table.

1 Reply

  • Something like this might work for you.

    % OF Country Sales = 
    var _countrySales = 
    CALCULATE(
        SUM('Table'[Value]),
        ALLEXCEPT('Table', 'Table'[Country])
    )
    Return
    DIVIDE(
        SUM('Table'[Value]),
        _countrySales,
        0
    )

    You can replace the 'Table' with your table name and the SUM('Table'[Value]) with the table/column from your table.