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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
abukapsoun
Post Patron
Post Patron

Calculated column formula

Hi experts,

Need your support please 

 

I have the following two table

 

ColA   ColB   ColC

X          17     P01

X          19     P01

Y          30     P02

Y          15     P02

Z          15     P03

 

ColAA  ColBB

P01       20

P02       20

P03       25

 

I want to calculate the % of ColB based on the input of ColBB.. meaning something like ColB/ColBB x 100 

 

so the end result would like that 

ColA   ColB   ColC

X          90%     P01

X          85%     P01

Y          ..%     P02

Y          ..%     P02

Z          ..%     P03

 

How can achieve this?

 

thank you very much in advanced

 

Thanks

1 ACCEPTED SOLUTION

Hi,

 

It worked absolutely fine! Thank you very much. 

Another question please. 

Now I want to display those values, I have used the matrix table to show each period. However the total displayed is the sum of both periods while I am looking to have it as an average. 

 

 

 11.JPG

When I use change the type to average, the values dont look correct. 

What do you suggest to correct it? Maybe if there is even another way without using the matrix table istead

 

22.JPG

 

Thank you very much

 

@v-yulgu-msft 

View solution in original post

3 REPLIES 3
v-yulgu-msft
Microsoft Employee
Microsoft Employee

Hi @abukapsoun ,

 

New a calculated column in the first table.

ColB/ColBB = [ColB]/LOOKUPVALUE(Table2[ColBB],Table2[ColAA],Table1[ColC])

1.PNG

 

Alternatively, you could establish a one to many relationship between two tables. Then, use below DAX formula.

ColB/ColBB = [ColB]/RELATED(Table2[ColBB])

2.PNG3.PNG

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi,

 

It worked absolutely fine! Thank you very much. 

Another question please. 

Now I want to display those values, I have used the matrix table to show each period. However the total displayed is the sum of both periods while I am looking to have it as an average. 

 

 

 11.JPG

When I use change the type to average, the values dont look correct. 

What do you suggest to correct it? Maybe if there is even another way without using the matrix table istead

 

22.JPG

 

Thank you very much

 

@v-yulgu-msft 

Hi @abukapsoun ,

 

Since the original question has been worked out, would you please kindly accept it as an answer so that it can benefit others? For any other question, I would suggest you post a new thread on this forum, so that more community menbers can view it and provide solutions.

 

Best regards,

Yuliana gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.