10 Replies Latest reply: Sep 22, 2011 11:00 PM by Xena Gillham RSS

    User select to display expression

    Aaron Couron

      I have a chart with 4 different expressions. The client has asked to be able to have user select which expressions to based on checking a box next to each expression in the legend. Is this possible?

        • User select to display expression

          If this is a straight table, and you are using Version 9 then it would be very easy because each expression has a conditional show against it.

          I'm guessing that this is not a straight table, perhaps bar chart/line chart/other chart.

          I would create three copies of the chart, each one showing a different expression. Each chart would have a show condition set in the layouts properties according to the value of a variable. Your buttons could simply set the value of that variable to whatever is appropriate for that button (View1, View2, View3). Again, if you are using V9 then it is very easy to assign a value to a variable via a button, but if you are using an earlier version it's still relatively easy through macros.


            • User select to display expression

              Having read it again, I may have misread the requirement, do you want the user to be able to select any or all of those expressions (i.e. user can select to show 1,2,3 or all 4 of them)? If this is the case then it's more difficult, and although other peopple have done it I gave up with it because I had stability issues with the complex macro that is required to achieve it.

                • User select to display expression
                  Aaron Couron

                  Yes, the user wants to display any combination of the expressions at one time. The wish was to be able to select/unselect the various expressions to display on the single chart. Thanks for your quick input.


                  It would definitely be a nice feature in a future edition: "User Selectable Display".

                    • User select to display expression

                      If I couldn't persuade them not to do this, and bearing in mind it's only 4 dimensions, then I would do it with multiple objects. This means creating a copy of the object for each combination of displayed expressions available (with 4 expressions, this means creating 14 copies of the object).

                      Each object would be displayed on a condition, so you only have one object displayed at any one time.

                      The problem with this approach is fairly obvious, the maintenance can be pretty tiresome if you have changes on the chart (because you have to make those changes to all 14 objects).

                      Anyway, let me know if you need any further help on it.

                        • User select to display expression
                          Aaron Couron

                          And then I already have the chart conditionally displayed 3 times already because I am required to use 3 different pre-aggregated fact tables. So now I would be creating the object 14 x 3 times for 42 instances. FORGET IT!!!

                          Again, thanks for the quick response. Great help!

                            • User select to display expression

                              Yeah, that's a real no-brainer.

                              Another option you might consider is to achieve it within the expressions themselves, this might prove a little challenging but it might be possible to have values in the right places with correct labels, but I suspect you would also have columns showing zeros with no labels where the user doesn't want to show something.

                              EG; User selects to show columns 1 & 4, so you'd like these in column 1 & 2.

                              Expression for column 1 would be something like ...... IF(VariableShow1 = 'YES' , Sum(Value1) , IF(VariableShow2='YES' , Sum(Value2) , IF............. etc

                              Similar for the label on column1.

                              Then for column2, you do the same thing but starting with number 2 and having a zero as the final else.


                              Not sure about this one myself, but it might be worth a quick try just to see if you like the concept.