Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Red & green Icon (traffic ) using Conditional formatting

Hello All,

 

I need help with a Conditional Formatting.

 

I have a measure in a Matrix named as Factor. It is derived using this DAX

 Factor = ([Commited Amount] / (SUM(Tab1[OP])-SUM(Tab2[Sales Amount])))
 
I also have a slicer created using a parameter,  the slicer has values -- 2, 3 and 4
so whenever i select any value in the slicer, let say i choose 3 it should subtract the factor value and if the value is greater than or equal to the chosen value ( in this case 3 ) a green button 🟢 should come left of the data or else ðŸ”´
Example 

 

Thank you for the help.

 

 
 
  • Hi Anonymous   
    Since you did not attach sample data for the index you calculated, I prepared a simple data set like in the picture and will demonstrate a  solution with a simple sum formula.
    The table :

     

    parameters fo slicer:

    The measure (instead of yours):

    factor_ = sum('Table'[Factor])
    The measure for the conditional formatting of circles :
    flag_traffic = IF([factor_]>=Selections[Selections Value],"g","r")
    The modifying of conditional formatting :
     

     

     

    The result :

     

    pbix is attached

    If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

1 Reply

  • Hi Anonymous   
    Since you did not attach sample data for the index you calculated, I prepared a simple data set like in the picture and will demonstrate a  solution with a simple sum formula.
    The table :

     

    parameters fo slicer:

    The measure (instead of yours):

    factor_ = sum('Table'[Factor])
    The measure for the conditional formatting of circles :
    flag_traffic = IF([factor_]>=Selections[Selections Value],"g","r")
    The modifying of conditional formatting :
     

     

     

    The result :

     

    pbix is attached

    If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly