Power BI Exchange

Please login or click SIGN UP FOR FREE to create your PowerBIUG account to join this user group.
Expand all | Collapse all

Custom Column

  • 1.  Custom Column

    Posted 16 days ago
    Hello,

    I have two column of True and False in my table, e.g. below

    name   |Full Time | Part Time
    User 1 |True        | False
    User 2 |False      | True

    I need to create an additional column to say is Full time, then show 1, if part time then show 0 else show -1.

    I cant seem to get it to work.

    Can someone guide me to the correct way.

    I tried creating multiple IF, but it keeps throwing back syntax errors :(

    Thanks in advance

    ------------------------------
    V S
    Analyst
    ------------------------------


  • 2.  RE: Custom Column

    Top Contributor
    Posted 15 days ago
    Hi,

    Add a new column in DAX using the following code.

    Column = 
    IF(User_Table[Full Time], 1, 
        IF(User_Table[Part Time], 0, -1)
    )


    ------------------------------
    Ben Howard, UK.

    Please mark any answer as recommended if it helps you.
    ------------------------------



  • 3.  RE: Custom Column

    Posted 14 days ago
    Got it, thanks!