cancel
Showing results for 
Search instead for 
Did you mean: 

negative number in characteristic

Former Member

Hi,

After some calculations I store a number, which can be negative or positive, in a characteristic. NUMC shows me a weird number when <0 and CHAR shows numbers like 1 -, 2, 3 -. These are correct, only the sign is located after the number.

I want to group the outcome in the columns of a report, but the result I get now has a sorting order of: 0, 1, 1 -, 2, 2 -, 3, 3 - etc.

I want it to be in a sorting order of - 2 , - 1, 0, 1, 2 etc. So the sign is in front.

I have been reading a lot for the last day, but never saw a solution. For instance I could not find a conversion routine, which does it.

Does somebody know how to handle negative numbers, so that the group sorting order is shown correct in the report?

Thank you,

Eelco

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Eelco,

Since you said its a Characterstic and not keyfigure, I doubt if it sorts out correctly.

You need to create a Formula variable (Create a new Calculated key figure and right click on the formula variable folder and select create a new variable...then click on the newvariable and select edit") with

Processing by : "Replacement path"

Reference characterstic: <your charactrestics>

and make sure you select "Number" in the currency/unit tab

Assign points if helpful

Regards, Uday

Former Member
0 Kudos

Thanks,

But I need a sorted group by in the columns and a KF does not do it. Example:

Days Late number of sales order items

..

-2 87

-1 123

0 300

1 156

Answers (4)

Answers (4)

Former Member
0 Kudos

I might add to my first post that I could create 2 characteristics.

1 for holding the sign (negative or positive) and 1 for holding the absolute value, but this way I create extra characteristics and I don't want to do this.

Former Member
0 Kudos

I got it.

After the calculations I do a 'Shift <char> CIRCULAR RIGHT'. Only - (minus) is later than any number. This means the alphanumeric order is in place.

Former Member
0 Kudos

Check if this helps...

Go to the query designer, in change mode of the query, click on PROPERTIES -> Under DISPLAY tab -> change the DISPLAY OF +/- SIGNS to your interest (-X).

Good luck!

Former Member
0 Kudos

Thanks,

It is already - X. It is a CHAR meaning that it will not treated as a number.

Former Member
0 Kudos

Hi,

The best way is to do the calculations and store this as a KF. Also for your desired results, condition feature might also work. Suggest you take a look at that as an alternative solution.

Cheers,

Kedar

Former Member
0 Kudos

Thanks,

But this solution would not help me in having a group by sorting order in the report columns.

Former Member
0 Kudos

Did you try doing the same manipulations and passing it to a KF rather than a char?

Former Member
0 Kudos

Thanks,

I need to do a group by in the columns and for a KF it is not possible.