Forum Discussion

mgauvin's avatar
mgauvin
Frequent Visitor
3 years ago
Solved

If Formula Three Criteria

Hello,

I am looking to make a measurement that says If my amount column is greater than 4 then show the letter G, but if it between 2.5 to 4.5 then show letter Y and if it less then 2.5 then show R. 

I have only been able to get two out of the three to work so far in another BI of mine:

 

Arrow = If (Paid[Milestone Amount in Client Curr minus Sub Item Amount Base Currency] < 0, UNICHAR(129095), IF(Paid[Milestone Amount in Client Curr minus Sub Item Amount Base Currency]>0, UNICHAR(129093), UNICHAR(129112)))

 

Any help would be greatly appericate!

 

 

  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi mgauvin ,

    Please try to modify the measure.

    measure =
    VAR _1 = [test]
    RETURN
        SWITCH ( TRUE (), _1 < 2.5, "R", _1 < 2.5, "Y", "G" )
    

    How to Get Your Question Answered Quickly 

     

    If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

     

    Best Regards
    Community Support Team _ Polly

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

     

3 Replies

  • mgauvin , If Paid[Milestone Amount in Client Curr minus Sub Item Amount Base Currency] is measure create measure if column create column or use sum(Paid[Milestone Amount in Client Curr minus Sub Item Amount Base Currency])  to create measure

     

    New column =

    var _1  =Paid[Milestone Amount in Client Curr minus Sub Item Amount Base Currency]

    return

    Switch( True() ,

    _1 <2.5 "R",

    _1 <2.5 "Y",

    "G")

     

     

    or

     

    New Measure=

    var _1  =Sum(Paid[Milestone Amount in Client Curr minus Sub Item Amount Base Currency])

    return

    Switch( True() ,

    _1 <2.5 "R",

    _1 <2.5 "Y",

    "G")

  • mgauvin's avatar
    mgauvin
    Frequent Visitor

    Amit Paid[Milestone Amount in Client Curr minus Sub Item Amount Base Currency] is a measure. So I switch it over to another example I am doing below which is also a measure called "test" and its need to be . I put in your formula in. Am I put this incorrectly? 

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi mgauvin ,

      Please try to modify the measure.

      measure =
      VAR _1 = [test]
      RETURN
          SWITCH ( TRUE (), _1 < 2.5, "R", _1 < 2.5, "Y", "G" )
      

      How to Get Your Question Answered Quickly 

       

      If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

       

      Best Regards
      Community Support Team _ Polly

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