I need to create a table that compares two time periods. The end user can define "current period" and "prior period". The user should have the option of comparing the following:
* Current [Month] to Previous [Month]
* Current [Quarter] to Previous [Quarter]
* Current [Year] to Previous [Year]
I have established that the best way to handle this is by using altered states so I have created a "Group 1" which will be Current Period and "Group 2" which will be Prior Period.
My table should ultimately look like this, where the user selected Q4 2014 as Current Period, as an example, and Q3 2014 for Prior Period.
I will need to have separate filters for each group. Both filters will include the same information but the user can select different dates to compare.
Multi Box that includes a three drop downs options; one for year, one for QuarterYear, and one for MonthYear.
So the user should only be able to select one of the three options within one group. A Year or a QuarterYear, or a MonthYear (i.e. 2014 or Dec 2014 or Q4 2014)
Is this possible to do? Can someone help me out with the expressions that I need to use? One expression will be in the column header to make the date reference dynamic and the other would be in the cells in each column to actually add data just from the selected time period.
I'm tackling this one step at a time so this is the next step to my first question on how to achieve the prior / current comparison...answer was to user alternate states, which I'm now trying to do:)
Thank you so much!
Your example is exactly what I was looking for. Thank you!
I am, however, having trouble implementing it with my data. Do you know what might be wrong with this expression?
I'm getting an error with the opening squiggly bracket...not the closing.
It looks like the syntax is correct however it's returning null and the answer should be 171. Any thoughts on why it would return null?
This is what I entered as the expression...
I am not seeing a file if you attached one with your "see this" post...BUT I was just playing around with it and somehow I tweaked something and it works!! Not sure what the magic change was but what matters is it is returning the correct amount.
Thank you so much, Reshma. Your example is what helped me through it.
One other question, Reshma...in your example you have one row of data. How would you set it up if you needed to have several rows of data where you show the group1 and group2 results in separate columns?