BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Oscarboots
Quartz | Level 8

Hi Forum,

 

I'm using SAS VA 7.1 on Windows & 32 bit & have created a table of data that has weekly counts by State.

 

So I've added a Crosstab Object to the Report builder & added Weekending (Date) to 'Columns', State to 'Rows' ($) & Counts (Float) as a Measure.

 

I use the 'Create - Difference from previous Period' & add that new calc to the table.

 

I'm just getting blanks between the Count rows & can't work out why.

 

Can anyone advise what's possibly wrong here?

 

Thanks

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Sam_SAS
SAS Employee

Hi Peter,

 

When you talk about the code, do you mean the syntax in the expression editor? 

 

The parameters are documented here:

http://support.sas.com/documentation/cdl/en/vaug/68648/HTML/default/viewer.htm#n1lxnqfip132can1hdzue...

 

This is the 7.3 doc, but I don't believe there is any difference from VA 7.1 if you are using 7.1.

 

The interval operators can be either _Inferred_, _ByMonth_, _ByQuarter_, or _ByYear_. There is not a way to specify a weekly interval.

 

My understanding is that the LASR data server is limited in what periodic intervals it can process, in the current implementation. This could possibly be expanded in a future release.

 

Thanks,

Sam

View solution in original post

5 REPLIES 5
Oscarboots
Quartz | Level 8

Hi Again,

 

I've found that by playing around with the aggregation of the measure that I can get results for 'Difference from Previous period'.

 

I've changed the measure to Count instead of Sum which shows a result but I do need to Sum my measure for the report.

 

I find it strange that I can't get this to work as I thoght it would be fairly straightforward.

 

Has anyone had the same issue??

 

Thanks

Oscarboots
Quartz | Level 8

After further playing around, I think I've discovered the answer.

 

I could be wrong but I don't think VA has the Aggregated measures set up for Weekly periods, just Month/Quarter/Yearly?

 

I'm using 7.1 so maybe this has changed but I would be interested to know how anyone has created a Week on Week % Change.

 

Once I converted my Weekly formatted date to Month & Yearly, I used those fields to use in the Aggregated Measures & all is well !!

 

Can't say I saw any limitations in my search for the answer??

 

Anyway, in case someone has the same issue, there it is (or is for me anyhow ...)

 

Cheers :  )   

Sam_SAS
SAS Employee
Hi Oscar,

The periodic operators do not use weekly intervals. It is only month/quarter/year as you mentioned.

It is possible that we will add support for more interval types in the future.

Sam
Oscarboots
Quartz | Level 8

Thanks for confirming Sam,

 

I've created a way to do it by reformatting my data to contain Weekly data Sales Count Fields for the Current Week, Last Week, Last Month & Last Year.

 

This allowed me to create an Aggregated Measure to calc my Week on Week etc ...

 

I would find a weekly option useful as a future suggestion to develop.

 

Btw, I saw the code behind the Aggregated Measure options & wondered if it's possible to alter the code to suit Weekly in the meantime?

 

ParallelPeriod(_Sum_, 'ProductTotal'n, 'WeekStarting'n, _Inferred_, _Inferred_, 0, _Full_, {Date}) - ParallelPeriod(_Sum_, 'ProductTotal'n, 'WeekStarting'n, _Inferred_, _Inferred_, -1, _Full_, {Date})

 

I've been trying to find more info about the  'Parallel Period', 'Inferred' & 'Full' terms in the code but can't find anything that helps me understand it & alter it to enable the Weekly option, any suggests??

 

Cheers Peter , (Oscar(Boots) is my Dogs nickname)   :  ). 

Sam_SAS
SAS Employee

Hi Peter,

 

When you talk about the code, do you mean the syntax in the expression editor? 

 

The parameters are documented here:

http://support.sas.com/documentation/cdl/en/vaug/68648/HTML/default/viewer.htm#n1lxnqfip132can1hdzue...

 

This is the 7.3 doc, but I don't believe there is any difference from VA 7.1 if you are using 7.1.

 

The interval operators can be either _Inferred_, _ByMonth_, _ByQuarter_, or _ByYear_. There is not a way to specify a weekly interval.

 

My understanding is that the LASR data server is limited in what periodic intervals it can process, in the current implementation. This could possibly be expanded in a future release.

 

Thanks,

Sam

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

Tips for filtering data sources in SAS Visual Analytics

See how to use one filter for multiple data sources by mapping your data from SAS’ Alexandria McCall.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 5 replies
  • 1528 views
  • 1 like
  • 2 in conversation