Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
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.
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() )
Solved! Go to Solution.
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
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
Hello Jimmy Tao,
It worked, Thank you. ^-^
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
142 | |
79 | |
64 | |
52 | |
46 |
User | Count |
---|---|
213 | |
89 | |
77 | |
66 | |
60 |