
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How can i load or get all table columns in one field and...?
Hi,
i load a table like this
Product | Sales | Sales Target | Online | Online Target |
---|---|---|---|---|
Bananas | 120 | 200 | 80 | 150 |
Socks | 300 | 1000 | 200 | 700 |
Now i want to create a field where i can select:
Show Sales
Show Online
In the dashboard i use this field and create a (only one) table wich should be dynamic:
[Select Field] -> Show Sales is selected and shows
Product | Sales | Sales Target |
---|---|---|
Bananas | 120 | 200 |
Socks | 300 | 1000 |
[Select Field] -> Show Online is selected and shows
Product | Online | Online Target |
---|---|---|
Bananas | 80 | 150 |
Socks | 200 | 700 |
What is the best practice for this?
I dont´t want to get the columnnames for a new field in a static manuell way, i prefer a dynamic one. Because the columns can change.
I think i can use the data from the loaded table and put the fields to a new field like this?!
Load
Sales & Sales Target as Show Sales
Online & Online Target as Show Online
from resident...
But is there a way that the names of the new fields are created automaticly according to a pattern?
Load
{columnnames with the same first word} as Show + {the first word before whitespace}
from resident...
So the script should load
Product as Show Product
Sales Target + Sales as Show Sales
Online + Online Target as Show Online
regards,
sam

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Keep your table as it is, then add a new Inline table as follow:
load * Inline [
ShowID, Show
1, ShowSales
2, ShowOnline
];
Now put your new Show field as a slection list :
Now in your table have 3 dimensions :
1) Product :
2) =pick(ShowID, 'Sales ='&Sales, 'Online ='& Online) : name it Actual
3) =pick(ShowID, 'Sales Target ='&[Sales Target], 'Online Target ='& [Online Target]) : name it Target
And now dpends of your selection in the Show field, the result would be ;
