Forum Discussion
merlingsf
6 years agoFrequent Visitor
Max value from two columns - Show blanks
Hi, I am having trouble geting a single max value for a row from three columns in a matrix. The columns are: Name, Date(Month), Price The Dataset: Name Month Price A January 75...
- 6 years ago
Hi merlingsf ,
We can try to create a measure to meet your requirement:
Measure = SUMX ( DISTINCT ( 'Table'[Month] ), VAR result = MAXX ( CALCULATETABLE ( DISTINCT ( 'Table'[Name] ), ALLSELECTED () ), CALCULATE ( MAX ( 'Table'[Price] ) ) ) RETURN IF ( CALCULATE ( MAX ( 'Table'[Price] ) ) = result, result, BLANK () ) )
By the way, PBIX file as attached.
Best regards,
v-lid-msft
6 years agoCommunity Support
Hi merlingsf ,
We can try to create a measure to meet your requirement:
Measure =
SUMX (
DISTINCT ( 'Table'[Month] ),
VAR result =
MAXX (
CALCULATETABLE ( DISTINCT ( 'Table'[Name] ), ALLSELECTED () ),
CALCULATE ( MAX ( 'Table'[Price] ) )
)
RETURN
IF ( CALCULATE ( MAX ( 'Table'[Price] ) ) = result, result, BLANK () )
)
By the way, PBIX file as attached.
Best regards,
merlingsf
6 years agoFrequent Visitor
Hi v-lid-msft,
Thank you so much for taking the time to look at this.
This seems to solve the problem.