Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Julia_Mav
Advocate I
Advocate I

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!

 

 

 image-2.png

1 ACCEPTED SOLUTION
jgeddes
Super User
Super User

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.




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





View solution in original post

1 REPLY 1
jgeddes
Super User
Super User

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.




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.