Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
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.
Month | Country | Sales_Amt | Total_Sales | Sales% |
Jan-21 | US | 10 | 210 | 4.76% |
Feb-21 | US | 20 | 210 | 9.52% |
Mar-21 | US | 30 | 210 | 14.29% |
Jan-21 | Canada | 40 | 210 | 19.05% |
Feb-21 | Canada | 50 | 210 | 23.81% |
Mar-21 | Canada | 60 | 210 | 28.57% |
Best Regards,
Vikram.
Solved! Go to Solution.
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])
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @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])
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsThanks a lot man. That helped. 😊😊
User | Count |
---|---|
140 | |
113 | |
104 | |
77 | |
65 |
User | Count |
---|---|
135 | |
116 | |
101 | |
71 | |
61 |