cancel
Showing results for 
Search instead for 
Did you mean: 

NE function in analytic view

Former Member
0 Kudos

Hi,

I am tryimg to restrict measure KSL On basis of my attribute cost element.....i want KSL Value where cost element is not blnk. i am trying this by creating calculating measure in my view... i had put below formula .... but it doesnt work....

if(cost_elem != ' ' , KSL).

i had think of restricting my attribute cost element NE Blank......then my measure value will come how i wants........ but i am not able to find formula in my restriction or calculation .....either ways....

Please suggest how to use that function.....

Thnksss

Kulwinder

Accepted Solutions (0)

Answers (4)

Answers (4)

former_member182114
Active Contributor
0 Kudos

Hi Kulwinder,

I faced similar issue and did something "equal" but different, try greater than 0 on your formula.

Also, if your table is replicated from ERP by SLT it should never have null values inside it, of course if it's a result of left join it can be null.

Regards, Fernando Da Ros

former_member182277
Contributor
0 Kudos

Hello Kulwinder,

My thoughts:

in the SAP HANA the null is represted as "?" symbol.

in you case Restricted measure can work.

or other you case use calcualted measure

if("cost_elem != ?, KSL,0) (correct if syntax)

by using above expression if cost element does not equal to null then return KSL otherwise return 0.

Please try this. hope it helps.

Regards,

neha

rama_shankar3
Active Contributor
0 Kudos

Kulwinder,

  RKF should work for your scenario.

Regards,

Rama

Former Member
0 Kudos

Hi Kulwinder,

I think what you need is a restricted measure in your analytical view. Something similar to the following (Col2 is what could be your cost_elem and Col1 is your measure - KSL):

Thanks,

Anooj

Former Member
0 Kudos

I had done exactly same way..... u have explained....bt somehow its nt wrkng......i guess i am missing something.....thnksss 4 u reply

Former Member
0 Kudos

Hi Kulwinder,

Is your cost element field character type? If so, empty values ('') and blank values (' '(single space),'   '(double space) etc) are all considered as genuine separate values. They are not treated as NULL values. Similarly if it is an integer type and it has a value 0, it isn't treated as a null value. Basically null values in a table will show up as '?' when you try to data preview or open content a table.

Unfortunately restricited key figures at this point in time do not support "Not Equal to" as an operator.

What you could do as a work around is to convert these empty and blank values (if they are not genuine cost centre values in your case) or zero values if its an integer type into NULL values with the following update statement:

UPDATE <schema>.<table> SET <cost_element> = NULL WHERE <cost_element> = '' OR <cost_element> = ' ';

After this your restricted key figure with "IsNotNull" operator should work.

Thanks,

Anooj

Former Member
0 Kudos

Hi Anooj,

Your point seems to be very valid......but my question is now.....where i use the formulas you have told me.....Such functionality is not possible in views......e.g....SET , Update function........

Thnkss

Kulwinder

Former Member
0 Kudos

Yeah you can't do it within your formula. You have to do the "update" in the SQL editor and also ensure any new data this inserted into the underlying table gets inserted as NULL values instead of space/blank.