Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
hanami001
Frequent Visitor

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 advice.

 

Thank you.

 

Capture111.PNG

 

Example.

If CM1 < 0 then column Cost CM1 is get value CM1 < 0 (negative value) and If CM 1 > 0 then column Cost CM1 is get value CM1 > 0 (positive value).

 

Cost CM = SWITCH(TRUE(),
   [ CM1] < 0, [ CM1] <= 0,
   AND([ CM1] > 0, [ CM2] < 0), [ CM1] > 0,
   BLANK()
)

 

1 ACCEPTED SOLUTION
v-yuta-msft
Community Support
Community Support

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()

)

2.PNG 

You can refer to PBIX:

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

 

Regards,

Jimmy Tao

View solution in original post

2 REPLIES 2
v-yuta-msft
Community Support
Community Support

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()

)

2.PNG 

You can refer to PBIX:

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

 

Regards,

Jimmy Tao

Hello Jimmy Tao,

 

It worked, Thank you. ^-^

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors