The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi
I have a calculated column called Percentage that shows the percentage of Col2 that is contained in Col1 (Simply: Col1/Col2 as a %). An example is shown below:
Col1 | Col2 | Percentage |
10 | 100 | 10,00% |
5 | 50000 | 0,01% |
5000 | 20000 | 25,00% |
5015 | 70100 | 35,01% |
The issue is that the total row (shown in bold) sums up the percentages from the rows above (10% + 0.01% + 25% = 35.01%). What I WANT it to do is to follow the same calculation logic as the preceding rows. In this case the answer I expect would be (5015/70100 = 7.15%). How can I do this?
Solved! Go to Solution.
Hi @Anonymous
Add column1 and column2 as measures. For example
Total Column1 = SUM ( TableName[Column1] )
Total Column2 = SUM ( TableName[Column2] )
Then:
Percentage Measure = DIVIDE ( [Total Column1], [Total Column2] )
Hi @Anonymous
Add column1 and column2 as measures. For example
Total Column1 = SUM ( TableName[Column1] )
Total Column2 = SUM ( TableName[Column2] )
Then:
Percentage Measure = DIVIDE ( [Total Column1], [Total Column2] )
User | Count |
---|---|
13 | |
8 | |
6 | |
6 | |
5 |
User | Count |
---|---|
24 | |
14 | |
13 | |
8 | |
8 |