0
votes

I have a matrix visual with 4 measures and I need to highlight a row if any 2 of the measures meet the condition of having a value of less than 15%.

I checked conditional formatting but it seems I cannot put multiple measures as condition there.

Problem: Need to highlight a row in matrix viz if two measures have values below 15%.

If anyone knows how I can solve my problem Please share your input, I'd be grateful.

I tried to make a new measure that would return a value (eg: 1) if any two of the measures have values less than 15% but could not write proper DAX.

Branch Highlight = 
var _lastyear4weeks = IF( [Last Year 4 Weeks] < 15,1,0)
var _overlastyear = if( [% over Last Year] < 15,1,0)
var _prior4weeks = IF( [Prior 4 Weeks] <15,1,0)
var _togoal = IF( [% to Goal] <15 , 1,0)

var _Result = if(_lastyear4weeks&&_overlastyear==1,1,0)

 return _Result

enter image description here

1

1 Answers

1
votes

I asume you ment when two or more have value less than 15%. If it needs to equal 2 you can change last row to: >1 becomes = 2

Branch Highlight = 
    var _lastyear4weeks = IF([Last Year 4 Weeks] < 0.15,1,0)
    var _overlastyear = if([% over Last Year] < 0.15,1,0)
    var _prior4weeks = IF([Prior 4 Weeks] <0.15,1,0)
    var _togoal = IF([% to Goal] <0.15,1,0)
return  if(_lastyear4weeks +_overlastyear + _prior4weeks + _togoal >1,1,0)