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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
kostask
Helper II
Helper II

Calculate the name of a cell based on its value and column

Hi, guys.

Actually, I'm not sure if it is possible to be solved since it seems pretty sophisticated.

So I have a matrix with rows (values A, B, C..) and columns (X, Y, Z), where I apply a calculated measure which gives numerical values as below:

 

 XYZ
A1087
B145
C345
D197

 

Is it possible for every row to grab the highest value and give it the name of the column that it belongs to?

So the final desirable output would be:

 

 XYZ
AX  
B  Z
C  Z
D Y 

 

Thanx!

 

Kostas

2 ACCEPTED SOLUTIONS
Jihwan_Kim
Super User
Super User

Hi, @kostask 

Please check the below picture and the sample pbix file's link down below, whether it is what you are looking for.

All measures are in the sample pbix file.

 

Picture2.png

 

 

https://www.dropbox.com/s/aowbs9mcj9pnijq/kostask2.pbix?dl=0 

 

Hi, My name is Jihwan Kim.

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

Linkedin: https://www.linkedin.com/in/jihwankim1975/


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

View solution in original post

Hi @kostask 

I am not sure whether I understood your instruction correctly.

Please check the below picture and the link down below.

The measure is in the sample pbix file.

 

Picture4.png

 

 

https://www.dropbox.com/s/qvigj4ihu246qcn/kostask.pbix?dl=0 

 

 

Hi, My name is Jihwan Kim.

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

Linkedin: https://www.linkedin.com/in/jihwankim1975/


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

View solution in original post

4 REPLIES 4
kostask
Helper II
Helper II

Another great solution.

 

Thank you @Jihwan_Kim!

Jihwan_Kim
Super User
Super User

Hi, @kostask 

Please check the below picture and the sample pbix file's link down below, whether it is what you are looking for.

All measures are in the sample pbix file.

 

Picture2.png

 

 

https://www.dropbox.com/s/aowbs9mcj9pnijq/kostask2.pbix?dl=0 

 

Hi, My name is Jihwan Kim.

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

Linkedin: https://www.linkedin.com/in/jihwankim1975/


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Hi @Jihwan_Kim. It seems that I wasn't actually right at my description.

In fact, the table is virtual and is produced by other tables and a calculated measure and is not single that stands by itself.

But what actually really can help is that the result I want to retrieve follows your solution that you gave me last time.

Actually, I want to replace the biggest variance per row level at the following table, with the column name that it belongs to.

For example, at Cus001 I want to replace the biggest row var (38,57%) with Prod Catz where it belongs,

at Cus002 32,14% with Prod CatZ also, at Cus005 21,00% (which is the biggest variance) with ProdCatY etc. Is it possible?

Capture.PNG

https://www.dropbox.com/s/qvigj4ihu246qcn/kostask.pbix?dl=0 

 

Thanx

 

Kostas

Hi @kostask 

I am not sure whether I understood your instruction correctly.

Please check the below picture and the link down below.

The measure is in the sample pbix file.

 

Picture4.png

 

 

https://www.dropbox.com/s/qvigj4ihu246qcn/kostask.pbix?dl=0 

 

 

Hi, My name is Jihwan Kim.

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

Linkedin: https://www.linkedin.com/in/jihwankim1975/


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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