Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
I have data in column A that I want to filter into two columns - column B and column C. Column A contains both negative and positive numbers. I want postive numbers in column B and negative numbers in column C. In Excel, this would be a simple IF statment, but I am unsure how to write this in DAX. Help, please!
Solved! Go to Solution.
1. ColumnB= If ( YourTable[ColumnA] >= 0 , YourTable[ColumnA])
2. ColumnC= if ( If ( YourTable[ColumnA] < 0 , YourTable[ColumnA])
If this works for you please accept this as a solution and also give KUDOS.
Cheers
CheenuSing
Hi,
Thanks for your support.
I don't know how to post sample files on this forum.
Here is my e-mail adres: rob_jouvenaar@hotmail.com
Please send me a email and i will reply you the sample files. OK?
Rob Jouvenaar
Hello,
I had the same question and managed to split the values of column A (amount) over column B (debet) and column C (credit).
Column A is a measure: SUM(table[Amount]).
The issue i have is in the totals.
I would like to summerize all (postive) amounts of column B and the (negative) amounts of column C,
With this solution above i get totals with 0 and i don't understand that.
Can you please help me with this?
Rob
Try doing it in the query editor
You can either create two new columns (B and C), one with the positive values, and one with the negative values
Or create one with the negative values, then filter out the negative values from column A
1. ColumnB= If ( YourTable[ColumnA] >= 0 , YourTable[ColumnA])
2. ColumnC= if ( If ( YourTable[ColumnA] < 0 , YourTable[ColumnA])
If this works for you please accept this as a solution and also give KUDOS.
Cheers
CheenuSing
Thank you for your help, @Anonymous!!
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.