Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hi,
I hope I dont confuse with this one, really any help is appreciated. Would like to show the below in % amount in powerbi and the calculation is as shown below:
Total for 2020 (O,T,V) = 429323
Total for 2021 (O,T,V) = 337780
This is the calculation for it, just need to know how I can make it work in powerbi:
For 2020
O = 76.96% (330398 is what % of 429323)
T = 1.86% (7996 is what % of 429323)
V = 21.18% (90929 is what % of 429323)
For 2021
O = 76.88% (259696 is what % of 330398)
T = 1.41% (4763 is what % of 330398)
V = 21.71% (73321 is what % of 330398)
The main point at the end is also to show the percentage difference in both years:
2021 O (76.96%) - 2020 O (76.88%) = Difference (%)
2021 V (21.18%) - 2020 V (21.71%) = Difference (%)
Same thing for T
Solved! Go to Solution.
@sraj
You need to create two measures and use them in matrix visuals it works fr you. I attached the PBIX file below my signature.
% of Row Total =
DIVIDE(
SUM(Table1[Value]),
CALCULATE(
SUM(Table1[Value]),
ALLSELECTED(Table1[Column])
)
)
2020 vs 2021 =
CALCULATE(
[% of Row Total],
Table1[Year] = 2021
)
-
CALCULATE(
[% of Row Total],
Table1[Year] = 2020
)
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
@sraj
You need to create two measures and use them in matrix visuals it works fr you. I attached the PBIX file below my signature.
% of Row Total =
DIVIDE(
SUM(Table1[Value]),
CALCULATE(
SUM(Table1[Value]),
ALLSELECTED(Table1[Column])
)
)
2020 vs 2021 =
CALCULATE(
[% of Row Total],
Table1[Year] = 2021
)
-
CALCULATE(
[% of Row Total],
Table1[Year] = 2020
)
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Hi Fowmy,
This is exactly what I am looking for, but it dont have the column as you have shown in the example, all I have them as rows shown as below with the values in them. In that case what can I do? Please advise.
O | T | V |
I did this for % of Row Total I have several columns
% of Row Total =
DIVIDE(
SUM(DATE_Detail[Total otv]),
CALCULATE(
SUM(DATE_Detail[Total otv]),
ALLSELECTED (DATE_Detail[tot_num_o],DATE_Detail[tot_num_t],DATE_Detail[tot_num_v]
)
)
)
Hi @sraj,
Can you please share a pbix or some dummy data(keep raw data structure) with expected results? It should help us clarify your scenario and test to coding formula.
How to Get Your Question Answered Quickly
Regards,
Xiaoxin Sheng
The above worked for me, just had to think it through and use it the way I wanted on my data.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
87 | |
81 | |
53 | |
38 | |
35 |