Reputation: 143
I have a data source like this:
ID Product Age
1 Amazon 18
2 Google 19
3 Facebook 20
4 Apple 21
5 Apple 22
6 Google 23
7 Amazon 25
8 Google 25
9 Facebook 27
10 Apple 29
11 Apple 28
12 Google 31
13 Amazon 32
14 Google 33
15 Facebook 34
And I want to create custom age segments like this (My visualization should look like this):
Product
Custom Age Group Amazon Facebook Google Apple
18-21 1 1 1 1
22-25 1 0 2 1
26-30 0 1 0 2
31-34 1 1 2 0
The user should be able to dynamically set the age groups.
For example, if the user wants to look at 18-25
and 28-34
age groups, the user should be able to make the changes on their own. Is this possible?
Upvotes: 1
Views: 137
Reputation: 557
Maybe not the most elegant solution, but you could creat an inline table like this :
LOAD * INLINE [
Age, AgeGroup
18, 18-21
19, 18-21
20, 18-21
21, 18-21
22, 22-25
23, 22-25
...
];
Upvotes: 1