Forum Discussion

hanami001's avatar
hanami001
Frequent Visitor
8 years ago
Solved

Get Positive and Negative Value from 1 column

Hi Everyone,   I want to get positive and negative values from 1 column to new column. For the picture below new column return is "True" and "False" but I want that to return Number value, please a...
  • v-yuta-msft's avatar
    8 years ago

    Hi hanami001,

     

    If my understand is right, you want to create a calculate column which can return value of [CM1] based on some conditions right?

     

    To achieve your requirement, please create a calculate column and use DAX:

     

    Cost CM = SWITCH(TRUE(),

       Table1[CM1] < 0, [CM1],

       AND(Table1[CM1] > 0, Table1[CM2] < 0), [CM1],

       BLANK()

    )

     

    You can refer to PBIX:

    https://www.dropbox.com/s/cf9v7xkupx0fikd/For%20hanami001.pbix?dl=0

     

    Regards,

    Jimmy Tao