Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello All,
I have a table containing transaction data for multiple quarters (which can be identified by a transaction date associate with it). I want to create a graph comparing any 2 quarters in the data but I want to give user a choice to select the quarters to compare may be using radio buttons. How do I go about this? I couldn't find an example which will help me to implement such a functionality.
Thanks
What would be the dimension you would be comparing them on? is it going to be quarter or some other dimension like country, state, etc..
Best,
Sunny
my dimension will be product ID and one of the graphs will be comparing the sales per quarter another will be change in price.
You can try to employ the concept of alternate states. Take a peek at the attached sample.
Best,
Sunny
try this way,sample attached.
u have to create 2 variables,
List box: Variable1--define listed values in list box(in ur case Q1,Q2,Q3,Q4)
List box: Variable2--define listed values in list box(in ur case Q1,Q2,Q3,Q4) (SAME VALUES)
use those variables in ur expressions,to render dynamic values from ur selections
Hi Siva,
thanks for this example, it is very close to what I want. Defining 2 variables and using them to change the input is something I was looking for! Now, I am trying a plot a graph for change in mVal by pVal as seen in attached example. i had the exact same graph before I started implementing the dynamic selection but for some reason I couldn't get this to work using the dynamic drop down for quarter selection. Any thoughts?
Does this look like something you are trying to do? (PFA)
Best,
Sunny
see attached and let us know,if u need any changes..,the problem with expression,i just replaced sunny exp here.
Edi: NVM it worked!
Hi Sunny,
This worked perfectly! Now one more question for the calculated dimension -
=Sum({<Quarter = {'$(vQuarter1)'}>}MValue) - Sum({<Quarter = {'$(vQuarter2)'}>}MValue)
For the above expression can I add one more set expression (Year) as follows:
=Sum({<Quarter = {'$(vYear1)'}>}{<Quarter = {'$(vQuarter1)'}>}MValue) - Sum({<Quarter = {'$(vYear2)'}>}{<Quarter = {'$(vQuarter2)'}>}MValue)
How can Quarter be equal to year? What exactly are you trying to do? Would you be able to give an example?