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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
CarolRamza
Frequent Visitor

How to separating negative and positive values into two different columns

I have this creditors list and i would like to separate DR values and CR values into two different columns.

 

 

pbi question.PNG

 

Regards,

CarolRamza 

 

1 ACCEPTED SOLUTION

@mattbrice 

 

The formula you gave me is giving the error below.

 

The syntax for ''Original Data'' is incorrect. (DAX(IF('Original Data'[Amount] >=0, 'Original Data'[Amount]))).

View solution in original post

8 REPLIES 8
mattbrice
Solution Sage
Solution Sage

Just add two calculated columns to data table:

 

Debit Column:

IF ( Table[Amount] >= 0, Table[Amount] )

 

Credit Column:

IF ( Table[Amount] < 0, Table[Amount] )

@mattbrice 

 

The formula you gave me is giving the error below.

 

The syntax for ''Original Data'' is incorrect. (DAX(IF('Original Data'[Amount] >=0, 'Original Data'[Amount]))).

@CarolRamza,

 

Reopen the file and try again.

Column =
IF ( 'Original Data'[Amount] >= 0, 'Original Data'[Amount] )
Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-chuncz-msft

 

Thanks i have tried that, but its still giving me errors. See screenshot below.

Capture.PNG

table with ‘Amount’ is ‘Original data’? You are trying to create calculated column?

@mattbrice 

 

Yes table with ‘Amount’ is ‘Original data’. Am actuctually trying to create two new cloumns; debit and credit. However the issue is 'how do i separate those values since they are in the same column?

Like I already posted.  Add two calculated columns.  I do it with accounting data all the time.  You must have syntax error or something as this is really basic.  

 

Post a link to file for someone to look at. 

CarolRamza
Frequent Visitor

@v-jiascu-msft kindly assist.

 

Regards,

CarolRamza

 

 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.