Forum Discussion
bhuprakashs
6 months agoHelper I
Conditional Formatting the row based on Maximum Value in Latest Month
Hi Team, I have a Power BI matrix with: Rows → Market Area Columns → Month (e.g. October 2025, November 2025, December 2025, January 2026) Values → a cumulative score measure What I want to ...
MFelix
6 months agoSuper User
Hi bhuprakashs ,
Add the following measure to your code:
Format =
VAR _MaxPeriod =
MAXX ( ALLSELECTED ( 'Table'[Date] ), 'Table'[Date] )
VAR _MaxValue =
TOPN (
1,
SUMMARIZE (
CALCULATETABLE (
SELECTCOLUMNS ( 'Table', 'Table'[Market], 'Table'[Date] ),
'Table'[Date] = _MaxPeriod,
REMOVEFILTERS ( 'Table'[Market] )
),
'Table'[Date],
'Table'[Market],
"C", [Score Value]
),
[C]
)
RETURN
IF (
SELECTEDVALUE ( 'Table'[Market] ) = MAXX ( _MaxValue, 'Table'[Market] ),
1
)
Be aware that you must change the Table and corresponding columns to match your model and I assume you are using a measure for the score then just add the condittional formatting based on this measure:
bhuprakashs
6 months agoHelper I
Hi MFelix Thanks for your help.
In below line , seems Market and Date are coming from same table. But I have these 2 different Dim tables.
Market is coming from Locations Table and Dates ( which is Month Year in my visual) are coming from Dates table.
Could you please help me how to calculate this since it's not working in my case. Thanks
SELECTCOLUMNS ( 'Table', 'Table'[Market], 'Table'[Date] ),