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
arvindyadav
Post Partisan
Post Partisan

How can I separate positive and negative values

Hi All,

 

I have one column which contain postive as well as negative and I want to seperate those in different column .

So how can I separate that column.

Please help me out.

 

Regards,

Arvind.

 

1 ACCEPTED SOLUTION

@arvindyadav,

 

Hi Arvind,

 

Do you mean this?

Positive =
IF ( MIN ( 'Table1'[Numbers] ) >= 0, MIN ( 'Table1'[Numbers] ), BLANK () )
Negative =
IF ( MIN ( 'Table1'[Numbers] ) < 0, MIN ( 'Table1'[Numbers] ), BLANK () )

How can I separate positive and negative values.JPG

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

If this isn't what you want, please post a sample and the result you want.

 

Best Regards!

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

6 REPLIES 6
GilbertQ
Super User
Super User

Hi @arvindyadav

 

In the Query Editor if you create a New Custom Column and put in the following where my column name is called 'My Number'

 

Number.Sign([My Number])

If the number is positive it will equal 1 and if negative it will equal -1.

 

You can then use this new column to seperate your values with the conditional column in the Query Editor

 

Here is the reference that I used: Number.Sign





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

Hi @GilbertQ,

 

Actually I want each and every number has to be display when I choose tabular form.

 

Regards,

Arvind

@arvindyadav,

 

Hi Arvind,

 

Do you mean this?

Positive =
IF ( MIN ( 'Table1'[Numbers] ) >= 0, MIN ( 'Table1'[Numbers] ), BLANK () )
Negative =
IF ( MIN ( 'Table1'[Numbers] ) < 0, MIN ( 'Table1'[Numbers] ), BLANK () )

How can I separate positive and negative values.JPG

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

If this isn't what you want, please post a sample and the result you want.

 

Best Regards!

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hello,

 

I have tried to apply this formula to my data, but I must get something wrong because the result is not what I would have wanted. 

I have the same type of data, pos and neg values in one coloumn and I would like to split them as in your example but the result that I get is the following:

Henrietta_0-1665135636025.pngHenrietta_1-1665135659960.png

Do you have some ideas on this?

 

Thanks,

Hi there,

 

I have tried using the above mentioned measure, but it is giving me an error.

 

 

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

 

Hi @CarolRamza,

 

Maybe your scenario isn't the same with this one. Please create a new thread in this forum. Please provide some sample data and the result you want.

 

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.