Forum Discussion
Conditional Formatting the row based on Maximum Value in Latest Month
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:
Hi v-veshwara-msft issue is not resolved and not working for me. but I am closing it out.
Thank you v-veshwara-msft MFelix
- MFelix5 months agoSuper User
Hi bhuprakashs ,
Can you please share a mockup data or sample of your PBIX file. You can use a onedrive, google drive, we transfer or similar link to upload your files.
If the information is sensitive please share it trough private message.- bhuprakashs5 months agoHelper I
Hi MFelix I have restrictions on my laptop to share anything. will try to create a dummy data and try to share with you.
My base measure is created from 2-3 different tables and on top of that some business logics are applied, which I am using here. May be due to that , it's not working.- MFelix5 months agoSuper User
Hi bhuprakashs ,
If you can setup a mockup has you refer or explain the semantic model that would be good to try and figure out what can be happening, has I refered that code I gave is the basic code but needs adjustments based on the real model.
Please feel free to reach out if you want.