Forum Discussion

moses07_ferns's avatar
moses07_ferns
Regular Visitor
1 year ago
Solved

Conditional Formatting Matrix Table By Rows

I want to apply conditional formatting row by row based on the value of the measures. For eg. I have three measures  Measure 1 :- Sales = SUM(Sales_Data[Total Revenue]) Prev Month Sales = CALCUL...
  • Jihwan_Kim's avatar
    1 year ago

    Hi,

    I am not sure if I understood your question correctly, but I tried to create three measure that rank three different measures in the table visualization. And then, in the conditional formatting option, I tried to configure like below for all three measures.
    Please check the below picture and the attached pbix file.

     

     

     

     

     

  • sanalytics's avatar
    1 year ago

    Hello moses07_ferns 

    You can follow below approach for your solution as well..
    1) One disconnected Measure Table 
    2) One Complete Measure.
    Below is the code

    ColorMatrix = 
    VAR _HighestValue = 
    MAXX(
     { [Sales],[Prev Month Sales],[Prev 2MONTHS SALE] },
     [Value]
    )
    VAR _lowestValue = 
    MINX(
    {[Sales],[Prev Month Sales],[Prev 2MONTHS SALE] },
    [Value] )
    VAR _MidValue = 
    MAXX(
     FILTER(
        { [Sales],[Prev Month Sales],[Prev 2MONTHS SALE] },
     [Value] > _lowestValue && [Value] < _HighestValue
     ),[Value]
    )
    VAR _result = 
    IF(
    [MeasureConection] = _HighestValue,
    "Green" , IF( [MeasureConection] = _MidValue, "Yellow",
    IF( [MeasureConection] = _lowestValue,"Red"
    ) ) )
    RETURN
    _result

    Below is the screenshot

    pbix file is attached.

     

    Hope it helps

     

    Regards

    sanalytics