Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set Analysis Headache!

Hi,

I have a weird problem that has been troubling me for a few days now. My output is to show the current month’s totals to the previous months, as well as the current month from the previous year. If you see in the attached example, I have selected Dec 2012 from the YEAR and MONTH Listboxes. The values for the selected month show without any problems BUT I can’t see the previous month and current month previous year's totals.

I’m using set analysis to get these values and control the months using variables (shown on the side of the table as well).

This is how I get my values and the variables:

Current Month: SUM({$<MonthDate={'$(vMonth)'}>} OperationalTrendTotal)

Previous Month: SUM({$<MonthDate={'$(vPreviousMonth)'}>} OperationalTrendTotal)

Current Month Previous Year: =SUM({$<MonthDate={'$(vPreviousYearCurrentMonth)'}>} OperationalTrendTotal)

vMonth =Date(MonthDate, 'YYYY-MM-DD')

vPreviousMonth =Date(AddMonths(MonthDate,-1), 'YYYY-MM-DD')

vPreviousYearCurrentMonth =Date(AddMonths(MonthDate,-12), 'YYYY-MM-DD')

1 Solution

Accepted Solutions
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     For previous month try this.

     SUM({$<MonthDate={'$(vPreviousMonth)'},Year = , Month =>} OperationalTrendTotal)

     When ever you are trying to get the data for against the selection, you must remove the selection as I have shown in above expression.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!

View solution in original post

2 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     For previous month try this.

     SUM({$<MonthDate={'$(vPreviousMonth)'},Year = , Month =>} OperationalTrendTotal)

     When ever you are trying to get the data for against the selection, you must remove the selection as I have shown in above expression.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Not applicable
Author

Hi Kaushik,

Thank you, that was correct!