Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have a table like this.
Category | Number | % Change |
1 | 2000 | 2 |
1.101 | 1000 | 3 |
1.102 | 1000 | 4 |
1.2 | 2000 | 5 |
1.201 | 1000 | 6 |
1.202 | 500 | 7 |
1.203 | 500 | 8 |
1.3 | 3000 | 2 |
1.301 | 1000 | 3 |
1.302 | 1000 | 4 |
1.303 | 1000 | 5 |
2 | 4000 | 6 |
2.201 | 1500 | 7 |
2.202 | 1500 | 8 |
2.203 | 1000 | 2 |
3 | 5000 | 3 |
3.301 | 1500 | 4 |
3.302 | 1500 | 5 |
3.303 | 2000 | 6 |
I want to create an application where in list box Only Parent category will be shown like1,2,3. Now if i select 1, subcategories(1.1,1.2,1.3) will be shown in corresponding charts.Like wise we can drill down to other categories.
Is there any way of doing this? I dont want to show data in a single pivot table. I want o create charts.
Thanks.
Create another field into your script using
subfield(Category,'.',1) as ParentCategory
Or, as a variation to the above, create this other field in your script using
floor(Category) as ParentCategory
to get the integer part as main category.
The advantage of using floor() is that you can also create intermediate categories,. For example
floor(Category, 0.1) as IntermediateCategory
will turn 1.203 into 1.2, 2.109 into 2.1 etc.
Peter