Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I am trying for this requirement for a long time. Here is the requirement.
I have 3 List boxes, one Bar chart, onr pivot table and 2 gauge charts.
Suppose I have a List box with the same dimension in Barchart as well. If I click on any of these (List box/Barchart), then the other chart(Pivot Table) is appearing. But my requirement is.. whenever I click on the Barchart, then only the other chart(Pivot table) should be appeared.
I tried with the alternate states also. But it is segregasting the objects with the rest in the document.
I am attaching the QVW for the same.
Thanks,
Pradeep
Hi Pradeep
What's the difference between your current solution and your goal? What's exactly wrong with attached document?
Lukasz
I don't think this can be done. A selection in the bar chart is exactly the same event as a selection in the listbox. There is no way to distinguish between them. It's like having two light switches for the same light. You can't tell from the light which switch was used.
Pradeep,
You can try something using macros and variables. See attached example, it has a macro that checks if the bar chart is active, and sets variable. The variable is included in chart show condition. So, the behavior is different depending where you make the selection.
(Not a comprehensive solution, just an idea to try.)
Regards,
Michael
Here might be a way to do it using alternate states like you mentioned. I added an alternate state TriggerState and set the chart to this state. Then I used this expression to listen to default state:
sum({<Dim1=$::Dim1,Dim2=$::Dim2,Dim3=$::Dim3>}Expression1)
Then I created a variable, vSwitch, with this expression:
=concat({TriggerState}distinct Dim1)
Then I added an action for the variable using document properites -> Triggers -> OnChange
Add Action: Copy State Contents, Source: TriggerState, Target: $
From there, we need to change condition to show charts.
Bar Chart:
count({TriggerState}distinct Dim1) = count({1}distinct Dim1)
Straight Table:
count({TriggerState}distinct Dim1) <> count({1}distinct Dim1)
There are some drawbacks to this, such as there not being any function like GetSelectedCount for alternate state (which is why the conditional is the way it is), the expression for your chart needs extra set analysis to listen to default state: {<Dim1=$::Dim1,Dim2=$::Dim2,Dim3=$::Dim3>}, and you have to clear selections in order to see bar chart again (or at least clear TriggerState). This may help you get a workaround going as well.
Please find attached.
Hope this helps!
Whenever we click on the Barchart then only the Pivot table should be appear. They should not be in any seperate group.
Thanks Gysbert
But the requirement is like that only.. 😞 . Need to check with the business once again.
Thanks Michael..
I have opted your logic and made the necessary changes..It's working..