Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The 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.

Reply
sraj
Responsive Resident
Responsive Resident

Percentage

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:

 

Capture.PNG

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

1 ACCEPTED SOLUTION
Fowmy
Super User
Super User

@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
)

Fowmy_0-1628284132282.png

 

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

4 REPLIES 4
Fowmy
Super User
Super User

@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
)

Fowmy_0-1628284132282.png

 

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

sraj
Responsive Resident
Responsive Resident

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.

OTV

 

Capture.PNGCapture 2.PNG

 

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

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
sraj
Responsive Resident
Responsive Resident

The above worked for me, just had to think it through and use it the way I wanted on my data. 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Feb2025 NL Carousel

Fabric Community Update - February 2025

Find out what's new and trending in the Fabric community.

Top Kudoed Authors