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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
vikrammankar
Frequent Visitor

How to calculate Sales%

Hi,

 

I have below table for Sales with three columns, Month, Country & Sales_Amt. 

I want to create two measures Total_Sales (Sum of all rows in the table) & Sales%. Can somebody help me with this.  Last two columns should be measures and not columns.  I have given these 2 columns for reference only, to tell what output I need.

 

MonthCountrySales_AmtTotal_SalesSales%
Jan-21US102104.76%
Feb-21US202109.52%
Mar-21US3021014.29%
Jan-21Canada4021019.05%
Feb-21Canada5021023.81%
Mar-21Canada6021028.57%

 

Best Regards,

Vikram.

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @vikrammankar ,

 

Add the following two measures:

Total Sales = CALCULATE(SUM('Table'[Sales_Amt]), ALL('Table'[Country],'Table'[Month]))


% sales = DIVIDE(SUM('Table'[Sales_Amt]), 'Table'[Total Sales])

 

MFelix_0-1640263294243.png

 


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

2 REPLIES 2
MFelix
Super User
Super User

Hi @vikrammankar ,

 

Add the following two measures:

Total Sales = CALCULATE(SUM('Table'[Sales_Amt]), ALL('Table'[Country],'Table'[Month]))


% sales = DIVIDE(SUM('Table'[Sales_Amt]), 'Table'[Total Sales])

 

MFelix_0-1640263294243.png

 


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



Thanks a lot man.  That helped. 😊😊

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.