Forum Discussion
sameergupta60
4 years agoHelper IV
Dax help
hi all, I have to measure the difference between the two-column. Ex if my RCC works on level r13 then BW at least on level r10 but it is on level R04 need to highlight the gap on that row....
- Anonymous4 years ago
Hi sameergupta60 ,
Please try:
Measure = var _maxLevel= MAXX(ALL('Table'),[Levels]) var _levelMinus3= RIGHT(_maxLevel,2)-3 var _LastBWDate=CALCULATE(LASTDATE('Table'[02 BW]),ALL('Table')) var _LastBWLevel= CALCULATE( RIGHT( MAX('Table'[Levels]),2),FILTER(ALL('Table'),[02 BW]=_LastBWDate )) return IF(MAX('Table'[Levels])="R"&FORMAT(_levelMinus3,"00") , IF(_levelMinus3> CONVERT(_LastBWLevel,INTEGER),"Red"))Set Conditional formatting for [Levels] and [02 BW] based on the measure:
Output:
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
4 years agoNot applicable
Hi sameergupta60 ,
Please try:
Measure =
var _maxLevel= MAXX(ALL('Table'),[Levels])
var _levelMinus3= RIGHT(_maxLevel,2)-3
var _LastBWDate=CALCULATE(LASTDATE('Table'[02 BW]),ALL('Table'))
var _LastBWLevel= CALCULATE( RIGHT( MAX('Table'[Levels]),2),FILTER(ALL('Table'),[02 BW]=_LastBWDate ))
return IF(MAX('Table'[Levels])="R"&FORMAT(_levelMinus3,"00") , IF(_levelMinus3> CONVERT(_LastBWLevel,INTEGER),"Red"))
Set Conditional formatting for [Levels] and [02 BW] based on the measure:
Output:
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- sameergupta604 years agoHelper IV
Hi,
thanks for the solutions but one issue while applying on conditional formating on level & BW getting error.
a date column containing duplicate dates was specified in the call to function 'last date' this is not supported