cancel
Showing results for 
Search instead for 
Did you mean: 

Critical issue with categories done with "if then else"

Former Member
0 Kudos

Hello all,

I have a critical issue managing categories with thousands of data.

The aim is do group data thanks to several parameters coming from different columns.

The grouping is done in several ways and priorities:

The first group is done thanks to a column A  (ex: if(Length({Trucks}>0 then "Truck")

The second group is done thanks to a column B  (ex: if(Length({Planes}>0 then "Plane")


The 10 other groups are done thanks to different values from  columns C and D (ex: if(Contain({Vehicle},"Turbo") then "Sport car" else if (Contain({Vehicle},"2 wheels") then "Motorcycle" else if({Price}>50 000) then "Luxurious Vehicle" ...


It is crucial to respect the order.


Result:

Lumira only takes into account the first group and don't take into account the other ones.


This is not a coding issue, because the third case works very well with the very same structure (if x1 then y1 else if x2 then y2 else if...).


It might be due to a memory overload.


Do you have any solution for this issue?


Many thanks in advance,


Nicolas

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Yes Maaz, here is an example:

                                                                     

ArticleDescriptionTrucksPlanesPriceResult
A0000014 tonsTruck25000Truck
A000002Bombardier S8Plane2250200Plane
A000003Turbo truckTruck100000Truck
A000004Ferrari turboSport car
A000005Bombardier S8Plane2250200Plane
A000006Mercedes SLX turboSport car
A000007Rolls Royce Phantom150000Luxurious Vehicle
A0000082 wheels Harley65000Motorcycle
A0000096 tonsTruck55000Truck
A000010Flying truckTruckPlane250000Truck
Former Member
0 Kudos

I don't know why we can't see the last column result: here it is..

Result
Truck
Plane
Truck
Sport car
Plane
Sport car
Luxurious Vehicle
Motorcycle
Truck
Truck
0 Kudos

Hi Nicolas,

I presume that the "Result" column is what you're trying to achieve, but are unable to. I believe the solution to your problem lies in the handling of null entries. The empty cells basically have a null value assigned to them. I was able to get the formula to consider all the conditions by doing a null check before actually doing any string operation.

So, I think you need to do something on the lines of

IsNotNull({Trucks}) and <some operation with Trucks>

for every column that you expect to have a null entry somewhere in the column.

Did that provide a solution to your problem?

Regards,

Maaz

Former Member
0 Kudos

Hi Maaz,

Thanks a lot : it works.

Do you have a tutorial or a book about this kind of practice?

I've bought a book about SAP essentials, but there no information like this.

Regards,

Nicolas

0 Kudos

Hi Nicolas,

Glad it helped! The official tutorials are here .

But, what I explained to you was just out of intuition as I thought that a null object might not be implicitly converted to an empty string.

Regards,

Maaz

Answers (1)

Answers (1)

0 Kudos

Hi Nicolas,

Just to clear my understanding, could you share a sample dummy piece of your dataset and a sample of what you are trying to achieve with these calculated dimensions?

Regards,

Maaz