Forum Discussion

Black3y's avatar
Black3y
Microsoft Employee
6 years ago
Solved

DAX IF/THEN Statement

Hi all,   I am trying to do a very simple measure to look at a field and simply create an IF "this" then "This" to basically relate what it currently a number to a Customer Name.  The field I am tr...
  • Greg_Deckler's avatar
    6 years ago

    First, Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

     

    Second, that is the symbol for a measure.

     

    Third, guessing that [NumberOfUsers] is a column, you will need to use aggregation like so:

     

    Measure = SWITCH(TRUE();
    SUM([NumberOfUsers]) < 250; "SME";
    SUM([NumberOfUsers]) < 1000 ; "Corporate";
    SUM([NumberOfUsers]) < 5000 ; "Enterprise";
    SUM([NumberOfUsers]) >= 5000 ; "Global";
    BLANK())