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

only function

Hi all,

Im display a table data where i need to restrict column data based on only condition.

i dont need any group hence left group field empty.

aggr(only({<[INVESTIGATION.Inv with Activity] ={0}>}Owner2),)

aggr(only({<[INVESTIGATION.Inv with Activity] ={0}>}ID),)

I alos tried this way.

only({<[INVESTIGATION.Inv with Activity] ={0}>}Owner2)

only({<[INVESTIGATION.Inv with Activity] ={0}>}ID)

both are giving blank(-) values even though data is there...

Plz help

Thanks,

Raghav

6 Replies
its_anandrjs

Please explain bit more clear or with any sample data to explain the problem

May this

only( {1} {<[INVESTIGATION.Inv with Activity] ={0}>}Owner2)

Or

only({1} {<[INVESTIGATION.Inv with Activity] ={0}>}ID)


Anonymous
Not applicable
Author

t1:

owner, ID

a,1

b,2

c,4

t2:

Id,Activy

1,0

2,0

I need to filter data based on  only( {1} {<[INVESTIGATION.Inv with Activity] ={0}>}Owner2)

so that i can see data only as below in table.


owner id

a       1

b       2

Anil_Babu_Samineni

There is no primary key in your two tables, how can you map to show them. Is there Any other field which are hidden mapping because your expression looks okay to me

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
luismadriz
Specialist
Specialist

Hi Raghav,

This is what I loaded (Notice the ID field, instead of using Id)

t1:

load * Inline [

owner, ID

a,1

b,2

c,4];

t2:

NoConcatenate

Load * inline [

ID,Activy

1,0

2,0];

And this is how the Table is created in the front end:

Untitled.png

If you want to get rid of the Null, you need to not show null values or to populate all the possible activities as activity 4 is not in T2

I hope this helps,

Luis

luismadriz
Specialist
Specialist

Or something simpler:

Untitled.png

jonathandienst
Partner - Champion III
Partner - Champion III

>>aggr(only({<[INVESTIGATION.Inv with Activity] ={0}>}Owner2),)

Syntax error - Aggr(0 needs a dimension value.


>>Only({<[INVESTIGATION.Inv with Activity] ={0}>}Owner2)

Only() returns a value if there is only one possible value for the expression and null if there is more than one.


Its not clear what you are trying to do. Perhaps you could claridy that and get more useful assistance.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein