Forum Discussion

AjithReddy049's avatar
AjithReddy049
Frequent Visitor
3 years ago
Solved

TOP3 and Bottom 3

Hi Team,   I have some scenarios, Here I would like to highlight to where ever we have sales data more than 17% Green   less than 3% Red remaining Blue, case by using selected slicer values we wou...
  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi AjithReddy049 ,

     

    You can create a measure as follows.

    Measure = var _amount=SUM('Table'[Sales Amount])
    var _all=CALCULATE(SUM('Table'[Sales Amount]),ALLSELECTED('Table'))
    var _percent=DIVIDE(_amount,_all)
    return SWITCH(TRUE(),_percent>0.17,"green",_percent<0.03,"red",_percent<=0.17&&_percent>=0.03,"blue")

    Go to the following setting and click "fx".

    Select "Field value" in Format Style and then choose the measure just created.

    Click OK, the result is below.

     

     

    Best Regards,

    Stephen Tao

     

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