Forum Discussion
pdmU100
4 years agoNew Member
DAX Help/Weird Problem - Measures, MAX (using dates) and Conditional Formatting
Hi, I wonder if you clever people can please help me..! I'm trying to conditionally filter a row depending on if a row value matches the max value of that column. The conditioning is rule bas...
- 4 years ago
There may be filters applied to other columns than just the [Reporting Period (Start Date)] column. Try removing that column from the REMOVEFILTERS so you're just left with REMOVEFILTERS('ALL')
johnt75
4 years agoSuper User
I think when you're calculating the max value for the date it is doing that within a row context which is filtering the date to just that month, so the max value will always equal the current value. You need to remove the filters when you're doing the calculation, so
Current BDX Conditioning =
var maxDate = CALCULATE(
MAX( 'ALL'[Reporting Period (Start Date)],
REMOVEFILTERS( 'ALL'[Reporting Period (Start Date)]
)
RETURN IF ( SELECTEDVALUE( 'ALL'[Reporting Period (Start Date)]) >= maxDate, 1, 0 )
- pdmU1004 years agoNew Member
Hi John,
Thanks, thats an interesting thought. Never considerd their might be inherited filers on the rows already, unfortunately it doesn't seem to work!
I'll keep playing about with it.