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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Anonymous
Not applicable

How to Divide/Multiply Rows in Matirx by Fixed values in a Column

Hello and thank you in advance for reading this post. I have a matrix that I am creating and I need to divide a row I created in the Matrix with a fixed column of numbers. This is a simple task in Excel, I will give an example:

 

EventCount of typeGoalMaximum pointsPercentage of Goal
Outreach504010 
Relationship Building192010 
Sponsored Events20205 
Sales Finalized454030 

 

Here I have different events which I then made a count column to separate the events into their own type. The [Goal] column and [Maximum points] column are fixed values (meaning I chose those numbers to work with), and [Percentage of Goal] which is my desired output. 

 

I want to divide [count of type]/[goal] and have the results go in the [percentage of Goal] column. Lastly, once I get the [percentage of Goal] column, I want to multiply the maximum points as these are my weights and have a new column to represent that as well. I know how to divide/multiply rows in Excel and have the desired columns output in their corresponding rows, but I don't know how to approach this in PowerBI.  

1 ACCEPTED SOLUTION

Hi @Anonymous 

Try this,

Calculated column code:

Percentage of Goal = 
VAR _CountOfType =
    CALCULATE (
        COUNT ( Table1[Type] ),
        FILTER ( ALL ( Table1 ), Table1[Event] = Table2[Event] )
    )
VAR _Goal = Table2[Goal]
RETURN
    DIVIDE ( _CountOfType, _Goal )
Column = Table2[Maximum points]*Table2[Percentage of Goal]

vxiaotang_0-1641453375629.png

 

Best Regards,

Community Support Team _Tang

If this post helps, please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Thank you for reaching out to me, perhaps I didn't explain myself properly.

 

I created two tables: the first table (table 1) has the information about the events. Let me give you an example of how (table 1) looks. This is a small example of the large dataset I have. 

 

Created By

EventTypeDate Created...
John SmithOutreachprospectingJan 1...
Jane AirOutreachprospectingJan 3...
John SmithRelationship BuildingRelationsJan 14...
John SmithRelationship BuildingRelations......
Huckleberry FinnFinalized salesEngagement......

 

Most of the data is irrelevant but I'm primarily focused on the event, name of the person, and the type. 

When I create the matrix I grouped [type] together as a count so it would show in the matrix I posted above. 

Now here is the second table (table 2) 

 

EventGoalMaximum points
Outreach4010
Relationship Building2010
Sponsored Events205
Sales Finalized4030

 

This is a table I created, and I made a relation between them using the [Event] column in both (table 1) and (table 2). In (table 1) there are names of individuals there. I was able put the [goals] and [maximum points] on the matrix as shown in the previous post.

 

I used a filter to look at each Individuals performance in each event. I want to be able to do the following:

 

EventCount of typeGoalMaximum pointsPercentage of Goal
Outreach504010 125%
Relationship Building192010 95%
Sponsored Events20205 100%
Sales Finalized454030 112.50%

 

For example John Smith completed 50 outreached for the month of January and the goal he has to meet is 40, this meant he 125% of his goal.

I want to divide [count of type] by [Goal] and have the corresponding solution in a column how its shown in Red

Hi @Anonymous 

Try this,

Calculated column code:

Percentage of Goal = 
VAR _CountOfType =
    CALCULATE (
        COUNT ( Table1[Type] ),
        FILTER ( ALL ( Table1 ), Table1[Event] = Table2[Event] )
    )
VAR _Goal = Table2[Goal]
RETURN
    DIVIDE ( _CountOfType, _Goal )
Column = Table2[Maximum points]*Table2[Percentage of Goal]

vxiaotang_0-1641453375629.png

 

Best Regards,

Community Support Team _Tang

If this post helps, please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Thank You! I really appreciate your assistance!

amitchandak
Super User
Super User

@Anonymous , based on what I got If you have an event available as a dimension. You can create a table using enter data and join it with the event table

How to Enter Data and Edit it: https://youtu.be/5nE7YGT72kU

 

or create a measure

Switch(Max(table[event]) ,

"Outreach",40 ,
"Relationship Building" ,20 ,
"Sponsored Events" , 20,
"Sales Finalized", 40

)

 

and use that

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors
Top Kudoed Authors