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.
Hello Everyone,
Appreciate it if you could please share how I can get the percentage of the sub-totals (Year1% and Year2%) in this table:
Year1 | Year1 % | Year2 | Year2 % | |
Region1 | 100 | 100% | 110 | 100% |
Sub-Region1.1 | 65 | 43% | 70 | 64% |
Sub-Region1.2 | 35 | 23% | 40 | 36% |
Region2 | 150 | 100% | 160 | 100% |
Sub-Region2.1 | 45 | 30% | 50 | 31% |
Sub-Region2.2 | 55 | 37% | 60 | 38% |
Sub-Region2.3 | 50 | 33% | 50 | 31% |
Thank You.
Solved! Go to Solution.
Hi @WAKAYN
Please refer to attached sample file with the solution
Amount = SUM ( 'Table'[Value] )
% Amount =
DIVIDE (
[Amount],
CALCULATE ( [Amount], ALL ( 'Table'[Sub-Region] ) )
)
Hi @WAKAYN
Please refer to attached sample file with the solution
Amount = SUM ( 'Table'[Value] )
% Amount =
DIVIDE (
[Amount],
CALCULATE ( [Amount], ALL ( 'Table'[Sub-Region] ) )
)
Thank you so much, tamerj1. This worked like a charm.
Thanks also to others who looked into this.
Sorry, pleae see corrected table below (Sub-Region 1.1, 1.2, etc. and some values are fixed):
Year1 | Year1 % | Year2 | Year2 % | |
Region1 | 100 | 100% | 110 | 100% |
Sub-Region1.1 | 65 | 65% | 70 | 64% |
Sub-Region1.2 | 35 | 35% | 40 | 36% |
Region2 | 150 | 100% | 160 | 100% |
Sub-Region1.1 | 45 | 30% | 50 | 31% |
Sub-Region2.2 | 55 | 37% | 60 | 38% |
Sub-Region2.3 | 50 | 33% | 50 | 31% |
Thank you.
this is the expected result. how is your dataset organized?