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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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