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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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.


Go to My LinkedIn Page


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.


Go to My LinkedIn Page


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.


Go to My LinkedIn Page


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.


Go to My LinkedIn Page


Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors