Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everyone,
I would like to display values in a table that I have not selected. The following formula is used (and doesnt work) 😞
= aggr(only{<Animal=E()>}Animal),Animal)
or
= aggr(only{<Animal=E(Animal)>}Animal),Animal)
What am I doing wrong? Thanks 4 help. 🙂
There is the Script:
Animal:
load * Inline [
ID,Animal
1,Bird
2,Cat
3,Dog
4,Fish
5,Frog
6,Turtle
];
A table wont show multiple rows values unless it has a dimension, If you would add ID column to the table you will get this result: (Set expression :- =only({1<Animal-=p({< >})>}Animal))
If i remove ID from the table it will show null values,
Now if i remove Id and change only to Count in set expression it gives me this result:
So try adding Dimension to the table and also use the expression
=only({1<Animal-=p({< >})>}Animal)
Mistakes:
In both expression you are using you are filtering in both the exclude expression as well as main expression.(exclude and possible are like sub-query of sql).
Try this :
= aggr(only({1<Animal=E({< >})>}Animal),Animal).
or
= aggr(only({1<Animal-=p({< >})>}Animal),Animal)
Sometimes exclude messes up so i prefer -=p.
One parenthesis was missing.
aggr(only({<Animal=E(Animal)>}Animal),Animal)
Yes, you are right, I forgot the brackets in the description. In the dashboard, however, the exact syntax you described was entered and unfortunately does not work. Also thought that it would have to work exactly as you described.
Tried both. Both as a dimension and as a measure. Unfortunately without success.
If you are using it in a chart as dimension, don't forget to add some expression to it, otherwise you don't see them because they are by deafult supressed.
Thanks 4 the answers. At the moment I tried:
=aggr(only({<Animal=E(Animal)>}Animal),Animal)
= aggr(only({1<Animal-=p({< >})>}Animal),Animal)
=aggr(only({1<Animal=E({< >})>}Animal),Animal)
unfortunately without result so far:
A table wont show multiple rows values unless it has a dimension, If you would add ID column to the table you will get this result: (Set expression :- =only({1<Animal-=p({< >})>}Animal))
If i remove ID from the table it will show null values,
Now if i remove Id and change only to Count in set expression it gives me this result:
So try adding Dimension to the table and also use the expression
=only({1<Animal-=p({< >})>}Animal)
@Gabbar Thx. This is the way to go. 😀