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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
common763
Helper III
Helper III

% of Total From Row-DAX Formula

Not wrapping my head around this today.  Should be simple for an expert.  

I have a matrix table with a main and sub category.  All I want is to display the % of total by Category per row.  Basically I need a measure that will take the likert range and give a % of total.  So the Main Category Focus Area Not Sure of 10, need to show 9% next to it in the column since the total is 90.  Then repeat for the sub categories.  Any help would be appreciated.  Thanks. Example below. 

 

Picture1.png

1 ACCEPTED SOLUTION

However, I prefer to choose easiest way to do it and not use many calculation.

 

Go to Power Query side(Transform Data)

 

Unpivot neccesary numerical columns.

uzuntasgokberk_3-1724421133927.png

 

Close & Apply. 

Create a Measure %Percentage:
"

% Percentage =
VAR sum__=
    CALCULATE(
        SUM('Table (5)'[Value])
    )
VAR sumall__=
        CALCULATE(
        SUM('Table (5)'[Value]),
        ALLEXCEPT('Table (5)','Table (5)'[Sub])
    )
RETURN
DIVIDE(sum__,sumall__)"

uzuntasgokberk_4-1724421530157.png

 

Kind Regards,
Gökberk Uzuntaş

📌 If this post helps, then please consider Accepting it as a solution and giving Kudos — it helps other members find answers faster!

🔗 Stay Connected:
📘 Medium |
📺 YouTube |
💼 LinkedIn |
📷 Instagram |
🐦 X |
👽 Reddit |
🌐 Website |
🎵 TikTok |

 

 

View solution in original post

4 REPLIES 4
common763
Helper III
Helper III

Just to clarify in case others use this thread.  My solution was to utilize the second suggestion.  My data was already unpivoted becasue it is survey data so did this mirroring above.

 

% Percentage =
VAR x =
CALCULATE(
count(Survey_Data[Value])
)
VAR y =
CALCULATE(
COUNT(Survey_Data[Value]),
ALLEXCEPT(Survey_Data, Focus_Area[Focus Area], Focus_Area[Q], Focus_Area[Swimlane])
)
RETURN
DIVIDE(x,y)

 

common763
Helper III
Helper III

Thanks so much.  Yes this worked.  I had to do an AllExcept for everything in Rows for Matrix table.  Have a great weekend and thanks again. 

uzuntasgokberk
Super User
Super User

Hello @common763,

 

You can solve this problem two ways which are DAX or Power Query. I'm going to show how to solve with DAX way.

Firstly, I created a simple table:

uzuntasgokberk_0-1724420818357.png


Created a measure which gives total:

"

Total =
VAR notsure__=
    CALCULATE(
        SUM('Table (5)'[NotSure])
    )

VAR never__=
    CALCULATE(
        SUM('Table (5)'[Never])
    )

RETURN
    notsure__ + never__
"

 

Created a measure which gives never percentage value:

"

% of Total_Never =
VAR notsure__=
    CALCULATE(
        SUM('Table (5)'[Never])
    )

RETURN
    DIVIDE(notsure__,[Total])"
 
Created a measure which gives notsure percentage value:
"
% of Total_Notsure =
VAR notsure__=
    CALCULATE(
        SUM('Table (5)'[NotSure])
    )

RETURN
    DIVIDE(notsure__,[Total])
"
 
Click your percentage measure one by one and click percentage icon in measure tools:
uzuntasgokberk_1-1724420941377.png

 

And final result(You will do that for every numerical value):

uzuntasgokberk_2-1724420959429.png

 

 

Kind Regards,
Gökberk Uzuntaş

📌 If this post helps, then please consider Accepting it as a solution and giving Kudos — it helps other members find answers faster!

🔗 Stay Connected:
📘 Medium |
📺 YouTube |
💼 LinkedIn |
📷 Instagram |
🐦 X |
👽 Reddit |
🌐 Website |
🎵 TikTok |

 

However, I prefer to choose easiest way to do it and not use many calculation.

 

Go to Power Query side(Transform Data)

 

Unpivot neccesary numerical columns.

uzuntasgokberk_3-1724421133927.png

 

Close & Apply. 

Create a Measure %Percentage:
"

% Percentage =
VAR sum__=
    CALCULATE(
        SUM('Table (5)'[Value])
    )
VAR sumall__=
        CALCULATE(
        SUM('Table (5)'[Value]),
        ALLEXCEPT('Table (5)','Table (5)'[Sub])
    )
RETURN
DIVIDE(sum__,sumall__)"

uzuntasgokberk_4-1724421530157.png

 

Kind Regards,
Gökberk Uzuntaş

📌 If this post helps, then please consider Accepting it as a solution and giving Kudos — it helps other members find answers faster!

🔗 Stay Connected:
📘 Medium |
📺 YouTube |
💼 LinkedIn |
📷 Instagram |
🐦 X |
👽 Reddit |
🌐 Website |
🎵 TikTok |

 

 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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