Forum Discussion

RickPowerBI's avatar
RickPowerBI
Helper I
6 years ago
Solved

Column with SWITCH statement

Hi,   I am trying to make a column that shows data after two “IF” scenario’s. I’ve posted this question before but I found a problem with the solution that I got.   If CreditInvoice = False, the...
  • Anonymous's avatar
    Anonymous
    6 years ago

    Hi RickPowerBI ,

     

     

    Please create a Calculated Column.

     

    IF1 Column =

    SWITCH(

    TRUE (),

    'Table'[Quantity] < 0 && 'Table'[CreditInvoice] = True, - ( 'Table'[Quantity]),
    'Table'[Quantity] > 0 && 'Table'[CreditInvoice] = True , 'Table'[Quantity],
    'Table'[Quantity] < 0 && 'Table'[CreditInvoice] = FALSE ,'Table'[Quantity],
    'Table'[Quantity] > 0 && 'Table'[CreditInvoice] = FALSE(), 'Table'[Quantity]
    )
     
     
     

    Regards,
    Harsh Nathani

    Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)