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
mpicca13
Resolver IV
Resolver IV

Matrix Sorting Concatenated Calculated column by Max Value - Not working on Blank Product Names

In my fact table I have a calculated column called [Currency w/ Max Price] which simply take a measure called Max Price = MAX('table'[Selling Price]) and concatenates it to a column with Currency Types (Could be USD, MXN, EUR)

 

In the fact table i've sorted my calculated column by the selling price.

 

The goal here is to display the the calculated column value in a Matrix for each product (Show the Max price and currency type of each product)

 

This work just fine with the exception of rows with blank Product Names.

 

See images below:

 

Calculated column in fact table

Capture.PNG

 

Matrix showing calculated column results for rows correctly and incorrectly: (I've highlighted both the result and the expected value in the Correct rows and the Issue rows)

Capture1.PNG

 

Any ideas on how I should resolve this? 

1 REPLY 1
MFelix
Super User
Super User

Hi @mpicca13 ,

 

Be aware that the use of measures in a calculated column returns incorrect results because of the row context.

 

A measure is evaluated in the context of the cell evaluated in a report or in a DAX query, whereas a calculated column is computed at the row level within the table it belongs to.

 

So you problably need to check the calculation that you have for the column because I believe you can have incorrect data in there.

 

Looking at the column you have probably you can use the same code to create a measure to use in your matrix visualization and get the result you need.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



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.