Exploring, modeling, predicting and reporting with SAS Visual Analytics and SAS Visual Statistics

Custom Category

Reply
Super Contributor
Posts: 268

Custom Category

Hi,

I have data for 6 months. I am trying to create a bar chart that shows current month vs previous month. So if I add a section prompt, the bar chart should show only 2 bars. The first month is easy. How do I create the second bar that points to the previous months data and place it adjacent to the current month?

ALTERNATIVE is ok too - I have 2 date variables (week of, date aired). I have a categorical variable Month (Jan - Jul). The custom calculation I am trying to do is on a measure "actual spend". When right click and try this option on Actual spend, I choose "create" -> "% difference from the previous month" but it lets me use only the 2 date variables but not the categorical variable month. I tried creating a duplicate date variable frm the "week of" and display as month using the format options. But still the custom category would not allow me to choose the new date variable.

How do I create the % difference of a measure (actual spend) at the weekly and monthly level? using any combination of the date variable (week of) and categorical variable (month)?

So I tried my best to create the custom category. this is the formula I got -

RelativePeriod(_Average_, 'Actual Spend'n, 'Week Of'n, _Inferred_, -1, _Full_, {Date}) )

but it  is not working correctly. for the first row, it gives a % but is . for all others.

Is there a lag function in SAS VA 7.1

Thanks,
saspert

Message was edited by: Raj Addepalli as on 08/04/2015

Message was edited by: Raj Addepalli

Regular Contributor
Posts: 196

Re: Custom Category

Hello,

Which version you are using?

You can use List (Controls) instead of drop down list in section prompts.

But every month you have to change the dates, it would not be automated.

Can you share "Week of" Logic.

Thanks & Regards,

Teja Surapaneni.

Super Contributor
Posts: 268

Re: Custom Category

My idea is to automate it. I eventually changed the drop down to check box so that multiple months can be displayed. But I was trying to see if only 2 months (current and previous) can be shown at a time.

Alternatively, how do I create a custom category that points to the previous month when the original category points to current month? I guess if the custom category can be built, it will be a simple matter of adding to the graph. Sorry for asking the same question in a different manner.

Super Contributor
Posts: 268

Re: Custom Category

I am SAS VA 7.1

Contributor
Posts: 69

Re: Custom Category

I would suggest filter the data for a data range for which you are looking to see the report and try to add month as lattice column in the bar chart that will show both months on the chart.

let us know, if it helps.

Ask a Question
Discussion stats
  • 4 replies
  • 554 views
  • 0 likes
  • 3 in conversation