Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
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 |
---|---|
94 | |
83 | |
78 | |
75 | |
66 |
User | Count |
---|---|
115 | |
105 | |
93 | |
65 | |
62 |