Forum Discussion

truttafisker's avatar
truttafisker
Icon for Helper II rankHelper II
2 years ago

Coloring matrix dependant on sub row values

I have a matrix with values and everything works .. 
But I would like to have a columns that on the toplvl of the row (do not know the correct term), shows if there is one of the sub-rows that has a values there is lower than a specific values .. 

I've tried to visualize it in Excel, I hope it makes sense .. 

because I have a subrow value there is lower than 10, then I would like to show in the top-lvl (what do you call it ??) for that particular columun that there is a value lower than 10 in the group of rows .. this should be indicated by a color or a value .. 

is this possible ?

5 Replies

  • ahadkarimi's avatar
    ahadkarimi
    Icon for Solution Specialist rankSolution Specialist

    Hi truttafisker, give this a try, and if you encounter any issues, let me know.

    Add a new measure. Assuming the sub-row values are in a column called AmountThisYear, use this DAX formula:

     

    HasLowValue = 
    IF(MINX(FILTER(TableName, TableName[Customer] = SELECTEDVALUE(TableName[Customer])), TableName[AmountThisYear]) < 10, 1, 0)

     

    Did I answer your question? If so, please mark my post as the solution! ✔️
    Your Kudos are much appreciated! Proud to be a Solution Specialist!

    • truttafisker's avatar
      truttafisker
      Icon for Helper II rankHelper II

      it might work .. the only problem now is that I get all the vendors, instead of the vendors where there are revenue .. 

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi truttafisker 

     

    Thanks for the reply from ahadkarimi .

     

    After my test, if you need to display red at the total level if the sub-row has data less than 10, it is currently not possible.

     

    But you can color the corresponding values, as shown below.

     

     

     

    Output:

     

    Best Regards,
    Yulia Xu

    • truttafisker's avatar
      truttafisker
      Icon for Helper II rankHelper II

      that I also could .. but it's not what I want .. if there is a "red" field then I would like the subtotal value also to be red.