Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have created an inline for all the dimensions used in the dashboard. I'm showing this fields in a dropdown. Can the dropdown change dynamically based on selected dimensions i.e. dropdown should show only dimensions which are currently selected?
Ex: Inline 1
Inline 1 |
---|
Product |
Market |
Brand |
Inline 2:
Inline 2 |
---|
State |
Country |
Now, I need a dynamic field, which will only show the values that are selected in Inline 1 and Inline 2. Is that Possible?
Thanks in Advance
Hello, Jaswanth!
It's true, the instance above just for visual part of report - User can only see which fields are selected, but can't interact with it.
If you want to make some dynamical and interactive field, please, make the followin:
1. Improve your script a little:
dim1:
Load *, dim1 as k Inline //where k is the first part of our static field which will become a dynamic field
[dim1
Product,
Market,
Brand];
dim2:
Load *, dim2 as k Inline //the same for the second part
[dim2
State,
Country];
dim_all:
Load distinct k
,round(rand()*30) as x //I've made this phony data just for checking, it can be omitted
Resident dim1;
Load distinct k
,round(rand()*30) as x //this too
Resident dim2;
//that's it - our combined field is ready, but it's still a static.
2. After reloading go to the document properties (Ctrl + Alt + D -> General -> Alternate States) and make two alternate states. I named them State A and State B;
3. Create two list boxes and make them alternate selectable. (In the ListBox properties on General tab you will be able to choose the State in the top right corner). So for the first ListBox with the field dim1 it will be State A, and for the second ListBox with the field dim2 it will be State B. Now you can select in dim1 and dim2 separately;
4. And here is the magic! Create another one ListBox and choose the expression in available fields. Make this expression as field:
=if(aggr(sum({[State A] + [State B]}x),k)>0,k) //I used phony generated data "x" for checkin' values which user will see on clicking dim1 or dim2 fields. There can be another verifying;
And here we go. The result will be the field which will be containing the values from selections made by dim1 or dim2 fields.
And another advantage is - the values of "x" will not be affected until you make selection exact in our dynamic field (dim1 and dim2 doesn't make a sense).
Hope you like it, because I feel excited about solving this task =P
Hi Jaswanth,
Like the example below?
you can also resize the inline list box to show hide excess spaces from demo app
Hello, Jaswanth!
If you're lookin' for result like this:
So you may be interested with attached file. There is a ListBox which values are combined from two separate list boxes.
Hope this is it!
use the Field$ to populate an expression based on the field selection
find attached
Thanks Sergey,
I am looking for an option you shared. However, I noticed that we are unable to select the values in the dynamic list box. I need those values as a selectable value. Is that possible?
Hello, Jaswanth!
It's true, the instance above just for visual part of report - User can only see which fields are selected, but can't interact with it.
If you want to make some dynamical and interactive field, please, make the followin:
1. Improve your script a little:
dim1:
Load *, dim1 as k Inline //where k is the first part of our static field which will become a dynamic field
[dim1
Product,
Market,
Brand];
dim2:
Load *, dim2 as k Inline //the same for the second part
[dim2
State,
Country];
dim_all:
Load distinct k
,round(rand()*30) as x //I've made this phony data just for checking, it can be omitted
Resident dim1;
Load distinct k
,round(rand()*30) as x //this too
Resident dim2;
//that's it - our combined field is ready, but it's still a static.
2. After reloading go to the document properties (Ctrl + Alt + D -> General -> Alternate States) and make two alternate states. I named them State A and State B;
3. Create two list boxes and make them alternate selectable. (In the ListBox properties on General tab you will be able to choose the State in the top right corner). So for the first ListBox with the field dim1 it will be State A, and for the second ListBox with the field dim2 it will be State B. Now you can select in dim1 and dim2 separately;
4. And here is the magic! Create another one ListBox and choose the expression in available fields. Make this expression as field:
=if(aggr(sum({[State A] + [State B]}x),k)>0,k) //I used phony generated data "x" for checkin' values which user will see on clicking dim1 or dim2 fields. There can be another verifying;
And here we go. The result will be the field which will be containing the values from selections made by dim1 or dim2 fields.
And another advantage is - the values of "x" will not be affected until you make selection exact in our dynamic field (dim1 and dim2 doesn't make a sense).
Hope you like it, because I feel excited about solving this task =P