Teri Patsilaras

6月 022017
 

There are several exciting new features in SAS Visual Analytics 8.1 that I know will excite you, including that you can now configure cascading prompts for the Report Prompt and Page Prompt areas! Prior to SAS Visual Analytics 8.1 there was a way to use parameters to configure cascading prompts for report and section prompts, but now all we have to do is define a Filter from the Actions Pane. It’s a lot less work and there are even a couple of different ways it can be done.

Method 1

Steps:
1.      Add Control Objects to Report or Page Prompt area.
2.      Assign Roles to Control Objects.
3.      Define a Filter from the Actions Pane.
4.      Test your cascading prompts and enhance controls.

Method 1, Step 1
Add the desired Control Objects to either the Report or Page Prompt areas.

Method 1, Step 2
Assign Roles to your Control Objects.

Method 1, Step 3
Create the cascading prompt by defining a Filter from the Action Pane. This means that for the selected data value in the source object, it will use that value to filter the target, i.e. return the rows where source prompt = selected value.

In this example, we are using our SASHELP Cars data set. Our source is the car’s Origin and the target is the car’s Make. If you pick Europe for Origin it will return the corresponding car Makes such as Audi, BMW, Saab, Volkswagen, etc.

Click on the source Control object, Origin, and from the Actions Pane, select Add filter.

Next, select the target object to filter and click OK.

You can check to be sure your action is defined by clicking on the Objects and looking at the Actions Pane.

Method 1, Step 4
Enhance your controls using the Options Pane and then test out your configured cascading prompts!

In my example, I made the Origin button bar required and changed the Selection background color and text color. I also added a bar chart to my report.

Method 2

Steps:
1.      Define a prompt hierarchy.
2.      Drag the prompt hierarchy to the Report or Page Prompt area.
3.      Test your cascading prompts.
4.      (Optional) Enhance controls.

Method 2, Step 1
Create a hierarchy for the data items for which you wish to create cascading prompts.

Method 2, Step 2
Drag your prompt hierarchy to either the Report or Page Prompt area.

Method 2, Step 3
Test your automatically configured cascading prompts! That’s right – this is another new feature. Well, it’s two combined, first is the Auto Controls. Second, if you drag a hierarchy data item to either the Report or Page Prompt area, SAS Visual Analytics automatically defines the Filter Actions for you.

Method 2, Step 4 (Optional)
Go back and enhance your Control Objects using the Options Pane as you like.

There you have it – cascading prompts anywhere in SAS Visual Analytics 8.1 reports: in Report Prompts, Page Prompts and of course still anywhere in the report canvas; and it’s as easy as defining Filter Actions. You may be wondering, is it possible to configure cascading prompts for different data sources? Not to worry – it is and I’ll show you in in my next blog.

Cascading Prompts as Report and Page Prompts in SAS Visual Analytics was published on SAS Users.

4月 112017
 

You may be wondering if you need something special to gain access to the Schedule Chart object. Don’t worry, you don’t, you just need to unhide this visualization if it isn’t already. You can do this from the Objects’ drop down menu. There are several other objects available to you if you’d like to show those as well. Simply check the ones you want to include in the list and then click ok.

The VA 7.3 Schedule Chart is similar to the traditional Gantt chart in that it serves to illustrate the start and finish duration of a category data item. You must provide a category data item and two date or datetime data items representing the start and end dates. You can also add a group by category, lattice by columns and/or rows.   Here is a simple example that visualizes my local school district’s 2016-2017 Traditional School Calendar.

Schedule charts can be used to visualize a variety of data such as:

  • Calendar Events
  • Project Tracking
  • Campaign/Promotional Runs
  • Floor Service Coverage

Essentially, any category which can be associated with a start and end date can use this visualization.

Here are some examples of using the Schedule Chart to look at project tracking data. Our team uses a similar visualization; however, I have modified real names and gave it a Star Wars theme for a bit of fun.

Example 1

In this example, the Project name is assigned as the main category. Here are a few takeaways:

  • The schedule chart gives a great bird’s eye view of a lot of data. This particular data has over 350 projects spanning a team of 19 individual members.
  • The schedule chart automatically includes the least and greatest date value. You can override the X Axis in the Properties tab by assigning a fixed minimum and maximum.

In this next screenshot, I have selected the manager Obi-Wan Kenobi to filter the Schedule Chart. Therefore, by adding section filters to this report, you can see how spotting coverage of Projects and Project Types are easy. And, with some Mock Combat planned later in the year, the Jedis might want to up their training.

Example 2

This example uses the same Schedule Chart role assignments as before, but different section prompt filters. Here, this report shows how an individual team member can use the Schedule Chart to visualize several things:

  • A list of his/her assigned projects.
  • The planned duration of each project.
  • How the projects are spread throughout the year.

If you chose to look at a particular Project Type, then this visualization would help list the Project names and how they span across the year.

Example 3

The next example moves away from the traditional use of putting the Project as the main category data item and instead places the Team Lead on the Y Axis. This now allows us to see how busy each Team member is and with which Project Type. By the way, did you notice the neat way the Team names are sorted? I used a custom sort!

Here are just a few more things you can do to enhance this visualization: you can adjust the transparency so you can see overlapping projects and you can easily add reference lines to the X Axis. In this example, I’ve added the reference lines for Q1 through Q4. I’ve also selected a manager from the report section filters and added an additional data item for the Label.

Example 4

In this example, I wanted to demonstrate the use of the Lattice rows and I also applied a Display Rule for the Project Type. This is a good way if you want to view overlapping information and the transparency property isn’t distinct enough.

 

Schedule Chart Limitations

If you want a bar representation on the Schedule Chart to appear then the data must have a start and end date for every row of data. If either is missing, then the category name will appear on the Y Axis but no bar will be displayed on the visualization.   Also, you cannot create an interaction from or to the Schedule Chart object. That means you cannot create a filter or brush with another object in the report area. The Schedule Chart will be filtered by either report or section prompts.   I hope you can include the Schedule Chart into your reports, it is one of my favorite visuals.

SAS Visual Analytics Designer 7.3 Schedule Chart was published on SAS Users.

2月 142017
 

In this post I wanted to shed some light on a visualization you may not be using enough: the Word Cloud. Word association exercises can often be a fun way to pass the time with friends, or it can trigger immediate action – just think of your email inbox and seeing an email from a particular person: your boss, wife, husband or child. The same can be true for information for your organization. A single word can quickly, efficiently and effectively communicate the performance of a company’s metric, hence the value of using a word cloud visualization in your report.

Let’s look at some examples. Here I am using the Insight Toy data and looking at the performance of Products based on customer orders.

As the word cloud in SAS Visual Analytics 7.3 Designer has a maximum row return of 100, I have used the Rank feature to look at the top 25 Products and the bottom 25 Products. I also created a filtered interaction between the word clouds and their respective list tables below to show a bit more detail around the next level in the hierarchy after Product Make.

Notice how impactful these Product names are compared to when using their corresponding SKUs. Be sure to pick a meaningful category to represent your data in the word cloud.

This type of visualization could lead to a great comparison report, comparing what the top and bottom Products were for the same month in the previous year.

What if your data doesn’t have the appropriate column to display on a word cloud? No problem. In this next example, I took the value of Sales Rep Rating and created a new Calculated Data Item to represent values less than or equal to 25% to be Poor, inclusively between 26% and 50% to be Average and everything else to be Above Average.

Using a word cloud for this new category data item allows you to quickly move through the different states and compare the Sales Rep Performance frequency. You could also use this new category to compare each performance group’s Order Totals.

Here is California’s Sales Rep Performance:

And here is Maryland’s Sales Rep Performance:


These are two ideas for you to think about how you might include the word cloud visualization into your reports to help quickly and effectively represent the status of a company’s metric beyond the standard text analytics usage.

tags: SAS Professional Services, SAS Visual Analytics

Visualization Spotlight: Visual Analytics Designer 7.3 Word Cloud was published on SAS Users.

11月 152016
 

If your SAS Visual Analytics report requirements include linking out to separate reports without the need to pass values, you may want to consider using images to enhance the appearance of your base report. Here are three style examples using images that you can use depending on your report design requirements and report user preference:

1.     Visually appealing
2.     Generic
3.     Screenshot of actual report.

There is no better substitute for looking at examples so here are some screenshots for you:

1.     Visually appealing

Use images in SAS Visual Analytics

2.     Generic

use-images-in-sas-visual-analytics02

3.     Screenshot of actual report

use-images-in-sas-visual-analytics03

Image selection

Using an image in your report has never been easier. You can navigate your local machine for the image and, if you want, you can also save the image in metadata. This allows other users with access to that metadata location the ability to use the same image. This is great when you want to impose consistency throughout your reports.

use-images-in-sas-visual-analytics04

use-images-in-sas-visual-analytics05

Setting link using image

To define a report link from your image, click on your image then open the Interactions tab. Then use the New drop-down menu and select the type of link you wish to define. For a Report Link or Section Link, use the Browse button to navigate the metadata and select your target. If you are linking to an External URL then enter the fully qualified URL or you can define a link to a stored process.

use-images-in-sas-visual-analytics06

Here is a breakdown of the report objects used in the main dashboard report. I also included the screenshots of my Daily, Weekly, and Monthly report examples.

Dashboard example breakdown

use-images-in-sas-visual-analytics07

Daily report example

use-images-in-sas-visual-analytics08

Weekly report example

use-images-in-sas-visual-analytics09

Monthly report example

use-images-in-sas-visual-analytics10

 

 

tags: SAS Professional Services, SAS Visual Analytics

Use images in SAS Visual Analytics to enhance your report link was published on SAS Users.

10月 252016
 

Requirements that are the most easily described can often be the most difficult to implement. I’m referring to requests like:

  • Display a gauge with the most recently collected metric.
  • Plot a 18 month rolling window of profit.
  • Display last month’s products percent of total metrics for visual comparison.

Okay, so these are pretty specific requests, which I built a report to answer, but none the less, requirements like these do exist.

Use Rank in SAS Visual Analytics

So, how do you implement these requests? Use rank! You might be wondering how this is possible since the rank feature requires a numeric value and these requirements are based on dates. Solution: use the TreatAs function. Let’s break it down step by step.

But first, here is a breakdown of the report objects used in this report. Notice that this report contains a section prompt via a button bar which prompts the user to select a Product Line. This section prompt filters all of the other objects by that Product Line value.

use-rank-in-sas-visual-analytics02

Step 1: Use TreatAs to create a metric from your date category

I am assuming that your data source has a date category. This will work with a date or date by month or date by year formatted data item. So long as the data item is recognized as a date then this technique will work.

This example will use the Date by Month data item. We will use the TreatAs function to create a metric, or in other words, a numeric representation of the date. That’s the great thing about dates in SAS, they simply represent the number of days before or after January 1, 1960. So the most recent the date, the larger the number, which we can then use rank to order.

From the Data tab, use the drop-down menu and select New Calculated Item….

use-rank-in-sas-visual-analytics03

Give your new calculated data item a name.

The result type will be numeric.

Under Operators, use the search window to find the TreatAs function; then drag that onto the visual pane. For the drop-down option, select _Number_.
Finally, drag the date data item onto the visual pane. In this example, we are using Date by Month

use-rank-in-sas-visual-analytics04

Step 2: Change the aggregation on your new measure to be non-additive

Next, we need to make sure this new metric that represents the Date by Month date is non-additive. We will not get the proper result if this new metric takes the sum or average when displayed on a visualization. To do this, navigate to the Data tab and click on the name of the new metric you created. In my example, I created a new metric named DateByMonthNum.

Toward the bottom of the Data tab are the data properties. Under the Aggregation property use the drop-down menu and select one of the non-additive metrics such as: Minimum, Median, or Maximum.

use-rank-in-sas-visual-analytics05

Step 3: Verify that your new measure returns the correct results

Now we can verify that when we rank our new measure, we get the expected results. To do this, I used a list table and added both the date data item Date by Month and the new metric data item DateByMonthNum. Here we can see that when I sort the metric data item by descending I get the expected results where each Date by Month value gives me a different DateByMonthNum value. I can also see that the more recent Date by Month value pairs to a larger DateByMonthNum value.

use-rank-in-sas-visual-analytics06

To be sure that you properly assigned a non-additive aggregation type, you can use the Show detail data property from the Properties tab. At the detail level you should see the same value pairs for the date and metric data items. Once you de-select Show detail data you should see the exact same value pairs. If you do, then you have correctly assigned your non-additive aggregation type.

use-rank-in-sas-visual-analytics07

Step 4: Use Rank to meet report requirements

Now that we have our metric properly created, we can use the Rank feature to display the last month’s metrics or a rolling window.

Last Month’s Metrics
In this visualization I used the Gauge Object.

use-rank-in-sas-visual-analytics08

On the Roles tab, I assigned Profit to the Measure role and Product to the Group role. I then created a five interval Display Rule between 0% and 50% at 10% intervals where anything over 50% is grouped together under the darkest green rule.

use-rank-in-sas-visual-analytics09

Now we must filter this visualization to display only the last month’s profit metrics; we do this by using the Rank feature. From the Ranks tab, you must first select the category data item you wish to subset by the rank. In our example, we want to display the last month’s metrics, so we will want to add a rank for the Date by Month data item. Once selected, click the button Add Rank.

use-rank-in-sas-visual-analytics10

Next we will need to select the metric we want to rank by. Next to the By drop-down; select our newly created metric DateByMonthNum. Then we will want to select the type of rank and how many to return. In this example, we will return the Top Count, i.e. the greatest value. And for the Count we want to return 1.

use-rank-in-sas-visual-analytics11

To help with the titling of the report, I added the exact same rank to a List Table object to display the data’s last month and to help report users know which month they are looking at.

use-rank-in-sas-visual-analytics12

use-rank-in-sas-visual-analytics13

Rolling 18 Month Window
The next visualization I created was a Line Chart Object plotting a rolling window of 18 month profit.

use-rank-in-sas-visual-analytics14

On the Roles tab, I selected Date by Month as the Category and Profit as the Measure.
On the Ranks tab, I selected the same values as I did for the list table and gauge objects, except I selected a Count of 18 to return the top 18 values of Date by Month ranked on our newly created metric DateByMonthNum. The rank will return the top 18 highest values for DatebyMonthNum which pair to the most recent 18 values for Date by Month giving us a rolling 18 month window.

use-rank-in-sas-visual-analytics15

Other Applications

In this example I used Rank at the month level but you could use this technique at the day level, quarter level, essentially for any supported date interval.

Assuming you have the proper data collected, you could also use Rank for the standard use of ranking the top X performing products, sales representatives or investment funds. You could also use rank to identify your bottom performing manufacturing equipment, car mileage, or school ratings.

Other Report Screenshots

use-rank-in-sas-visual-analytics16

use-rank-in-sas-visual-analytics18

tags: SAS Professional Services, SAS Programmers, SAS Visual Analytics

Use Rank in SAS Visual Analytics to display the last date, month or rolling window was published on SAS Users.

9月 062016
 

For many people, building something from scratch, no matter how simple or complex, is fascinating. That’s why programs similar to How’s It Made are so appealing and, for me, addicting. And thus, the inspiration for this blog; I will walk you through building a set of graphs and how to improve each visualization through my own personal iterative process. Like all forms of art, a visualization is never complete, as constant improvement, tweaking and alterations are required to accommodate the constant influx of data and the ever changing needs of our audience.

These graphs use telecom data about cell phone network service including call duration and data usage.

Example 1: Calls versus Drops

In this first example, I noticed that the data contained the number of calls and the number of dropped calls. Like most analytics, audiences are interested in the outliers. In this case, we look at the poor performing occurrence of a call being dropped. This data would prove useful if a company wanted to research poor performing cell technology either of the handset itself or of the cell towers. It could also be used to find any dead zones, where additional towers may need to be added. In this example, I decided to plot the data against the 24-hour day to determine if volume of calls impacted the number of calls dropped.

Example 1: Iteration 1
Naturally, I started with a bar chart visualization. I plotted the hours of the day (24-hour scale) on the x-axis and the number of calls and the number of dropped calls on the y-axis. At first glance, it looks like there is some variation in the number of dropped calls and the hour of the day.

Visualize cell phone data in SAS Visual Analytics

Example 1: Iteration 2
Since the number of calls and the number of drops are of the same scale, we can easily take the ratio of the two to plot the call drop rate. The equation is to take the number of dropped calls divided by the number of calls. I used an aggregated measure to create this ratio, which will be evaluated on the fly, depending on the Group By variable. In this example the “ByGroup” is the hour of the day, and I used a Percent format.
Visualize cell phone data in SAS Visual Analytics2

This now gives us one bar to evaluate against the hours of the day. We can see that the Call Drop Rate does not fluctuate as much as the previous graph could lead one to believe.

I also added a reference line at 5% to make it easier to see which hour of the day fell below or above the 5% rate.

Visualize cell phone data in SAS Visual Analytics3

Example 1: Iteration 3
Finally, I noticed that the data contained a Cell Technology category. I thought it would be interesting to see if a certain technology was more unreliable than another. To do this, I added Cell Technology to the graph. I liked the visualization the best when I changed the bar chart to a horizontal orientation, used a row lattice for the Cell Technology and kept the 5% reference line. This now gives me an enhanced “quick glance” comparison ability to see that the 4G Cell Technology seems to have the most consistently high Call Drop Rate (over 5%) for all hours of the day.
Visualize cell phone data in SAS Visual Analytics4

Example 2: Call Duration

Example 2: Call Duration
In this second example, I used the Voice_Seconds data item to study the duration of calls over the course of the 24-hour day. This visualization could help determine what the peak hours of the day are for voice calls and potentially the best time to schedule any required maintenance to impact the least amount of customers.

Example 2: Iteration 1
Again, I stared with a bar chart visualization where I plotted hours of the day on the x-axis and the Voice_Seconds on the y-axis. The first thing I noticed was that at hour 20 there was a peak _SUM_ of over 3 million Voice_Seconds. This immediately prompted me to want to find out how long 3 million seconds was and that I need to look at the average of Voice_Seconds.

Visualize cell phone data in SAS Visual Analytics5

Example 2: Iteration 2
The first thing I did was create another aggregated measure to produce the Average Call Duration. To do this I took the sum of Voice_Seconds divided by the sum of the number of calls for a By Group.

Visualize cell phone data in SAS Visual Analytics6

The next thing I wanted to do was provide a reference point for how long 1,000 seconds is in minutes. Granted, I could convert Voice_Seconds into a new metric but instead I decided to use a reference line where 900 seconds equates to 15 minutes.

Visualize cell phone data in SAS Visual Analytics7

Example 2: Iteration 3
Lastly, I wanted to see if the type of Cell Technology had any impact on the distribution or length of call, mostly just because I was curious.  I was surprised that this data shows an average call of 15 minutes. That’s a long personal call when I consider most of my calls consist of “are you on your way?” and “we forgot x at the store – please pick it up on your way home”.

If this were call center data you would be able to determine how quickly issues were getting resolved. If this were sales call data, and representatives were following a script, this visualization would show, on average, how long those calls took and maybe the longer calls would result in a sale. So you could see which hours of the day sold more product.

Visualize cell phone data in SAS Visual Analytics8

Example 3: Data Usage

In this third example, I explored the data usage. I had two data items available for use: mbytes_up and mbytes_down. This visualization could help determine peak hours for which to perform system upgrades or maintenance. It could also help identify those peak hours and then add tower locations to help determine if additional hardware could help network speed performance.

Example 3: Iteration 1
I started with the bar chart visualization and plotted the hours of the day on the x-axis and the mbytes_up and mbytes_down on the y-axis. Again, the first thing I noticed was that I was looking at the _SUM_ for the metrics and the large difference in the numbers for up versus down usage.
Visualize cell phone data in SAS Visual Analytics9

Example 3: Iteration 2
The first thing I did was convert the megabytes to gigabytes by creating new calculated data items and then I created the Average Upload and Download by creating aggregated measures.

Here are the two metrics I created for Upload:
Visualize cell phone data in SAS Visual Analytics10

And here are the two metrics I created for Download:

Visualize cell phone data in SAS Visual Analytics11

This makes the visualization a bit easier to consume, now that we can compare the average upload or download size per session. I also added two reference lines at 5 GB and 15 GB. I still felt like the data needed to be visualized a bit better to understand the usage since I know most typical cell phone plans allow for 5 GB of data per month and the average session using more than 15 GB, it just seems like a lot.

Visualize cell phone data in SAS Visual Analytics12

Example 3: Iteration 3
To further classify the data I added Cell Technology to the visualization and broke it into two visualizations: one for upload and one for download. Once I did that, the visualization really started to show different data usage patterns.

Both visualizations show the 4G technology doesn’t even reach 5 GB, which makes me think that the customers with new phones and new service plans are sticking to their data allowance. But the customers with the older technology of 3G may be “grandfathered” in with their unlimited data plan and making the most of it.

Average Upload (GB)
Visualize cell phone data in SAS Visual Analytics13

Average Download (GB)

Visualize cell phone data in SAS Visual Analytics14

This blog has taken you through three examples of how I iteratively develop visualizations using SAS Visual Analytics. Ultimately, what this process shows you is that the more specific business question you have, the better a visualization you can create.

tags: SAS Professional Services, SAS Visual Analytics

Steps to visualize cell phone data in SAS Visual Analytics: Can you hear me know? was published on SAS Users.

8月 162016
 

Reference lines on a visualization are used to help identify goals or targets, acceptable or unacceptable ranges, etc; basically any metric that puts a frame of reference around the values on the visualization.

The Percent of Total of a metric is used to help identify a part-to-whole relationship. It answers the question, how much of the whole does this piece represent?

In this blog, let’s take a look at how you can use both the Percent of Total metric and Reference Lines  to enhance your data visualizations using SAS Visual Analytics.

Example 1

In this section, we are reporting on the Percent of Total for Revenue. First, look at the single select List control object. You’ll see I have displayed the available Product Lines and their corresponding frequency percent. This allows the report viewer to quickly understand the number of rows associated with that Product Line when compared to the whole of the data.

Next, under the List control object, we have a Stacked Bar Chart graphing the Revenue (Percent of Total) which allows the report viewer to understand the part-to-whole relationship of the Products that make up that Product Line. While we can clearly see that the Board Product, colored in blue, is outperforming the other two Products, it may be difficult to tell which remaining Product is pulling in the higher Revenue.

The Grouped By Bar Chart in the middle of the report can be used to quickly compare the performance of each Product. I added a reference line so that the report viewer can quickly identify which Products are pulling in more than 25% of the Revenue for that Product Line.

Percent of Total and Reference Lines

Here are some additional views from this report:

In this view, we have selected the Action Figure Product Line and it makes up 57.32% of the Frequency Percent. We can see that not one individual Product in the Action Figure Product Line reaches 25% of the Revenue’s Percent of Total and that they are all hovering near 15%. By using the Revenue (Percent of Total) metric all of the data is normalized and the static reference line allows for quick and easy comparison over all of the Product Lines.
Percent of Total and Reference Lines

And in this view, for the Promotional Product Line which makes up 7.05% of the Frequency Percent of the data, we can see that there are a few Products that are outperforming the others. As these are promotional products this can be expected as trends and styles fluctuate.

Percent of Total and Reference Lines

After examining this report about Revenue (Percent of Total), you can easily think of other reports that would be useful to an organization. For the high and low Revenue (Percent of Total) values, are the number of employees assigned to the Products and/or Product Lines appropriate? What about the Expenses both Operational and Material for your most and least revenue generating Products and/or Product Lines, is the spending reasonable? Are the Product Material Costs justified?

Using a part-to-whole comparison visualization can help identify other areas of business that may need further investigation.

Example 2

Here is another report example using the Revenue (Percent of Total) metric with reference lines. In this example, we plotted Revenue (Percent of Total) against the months of the year. Here we can see how the Revenue (Percent of Total) is dispersed across the months. I’ve also added a Percent of Total and Reference Lines

As the Promotional Product Line lends itself to the most fluctuation, we can see the breakdown of the Revenue (Percent of Total) and how it maps to the different months. Like the other report, this can then lead to additional reports to answer questions of if there is any seasonality to the spikes, or pair these findings with other market events. The Revenue (Percent of Total) for iPhone Covers is higher in July 2011, was there a new iPhone release that month? It may also be good to learn what was happening in April 2011 as the Revenue (Percent of Total) for Backpacks increased.

Percent of Total and Reference Lines

Combining the results of these reports with other groups in the organization can help determine which business decisions are having the desired impact on the bottom line results. Are the marketing strategies effective? Are the planned expense reductions are being met? Are we making better use of our product material waste?

Reference lines can help by making it easy to quickly identify whether or not targets are being met. And by using the Revenue (Percent of Total), a single reference line can be used across several categories since the scale has been adjusted to 100%.

tags: business intelligence, SAS Administrators, SAS Professional Services, SAS Programmers, SAS Visual Analytics

Use Percent of Total and Reference Lines to ask better business questions was published on SAS Users.

5月 252016
 

Pick your category? If this title seems familiar, that’s because in my last blog, Use parameters to pick your metric in VA Reports, I covered how to use parameters to allow your users to pick which metric they want to view in their visualizations. This is a great technique that offers a solution to many report requirements.

But, what if your users require specific axes labels and titles for your visualizations? What if your users require reference lines? If you encounter these requirements then consider using a stack container to meet these needs.

Let’s take a look; but first, here is a breakdown of the report we will be looking at in this blog. This report does not have any report level prompts but it does have two section prompts. Section prompts filter the data for every object on this section. There is a drop-down list control object that prompts the user for Year, and there is also a button bar control object that prompts the user for Continent.

Then in the report body there is a list control object, a text box and a stack container. The list control object prompts the user for Country. The text box provides the first half of the report title. And the stack container provides a way to organize multiple visualizations on your report; it layers or “stacks” the objects as if they were in a slide deck. The stack container provides navigation options to cycle through the visualization objects that were added. In this example, I added two bar charts and one line chart object to the stack container.

Use a stack container in SAS Visual Analytics

In this first view, I have the Product Line bar chart selected from the stack container. Notice in this bar chart I have two reference lines defined for the Y-axis: one at 250,000 and one at 500,000 for Order Total. Having these reference lines remain static as I select different continents from the button bar section prompt helps to compare these values across the different countries and regions. You can use reference lines to help identify goals or targets, acceptable or unacceptable ranges, previous year average or even previous month average, etc., basically any metric that puts a frame of reference around the values on the visualization.

Use a stack container to pick your category in Visual Analytics02

In this second view, I have the Vendor Type bar chart selected from the stack container. Notice in this bar chart I do not have any reference lines.

Use a stack container to pick your category in Visual Analytics03

In this third view, I have the Month line chart selected from the stack container.

Use a stack container to pick your category in Visual Analytics04

I have used the text box in this report to help with the custom titles. In this case, the title of this report is Total Orders By then each visualization in the stack container uses the category role as its title: either Product Line, Vendor Type or Month to complete the report title.

Use a stack container to pick your category in Visual Analytics05

What can you do with a stack container?

You cannot create an interaction or link to or from the stack container itself, but you can from the individual objects that are inside the stack container.

The way the stack container is used in this report allows the user to focus on the metric Order Totals and then examine these values across several category data items. As you can see, I have created an interaction from the list control object to each visualization in the stack container which allows the report user to filter out outliers or compare specific countries.

Use a stack container to pick your category in Visual Analytics06

In this screenshot, I have North America selected for my continent. We can see that the values for United States greatly exceed the values for Mexico and Canada. We can also see how far the United States values are from our reference lines.

Use a stack container to pick your category in Visual Analytics07

If I remove United States from this visualization - by using the list control to select Canada and Mexico - I can see more clearly how these values compare to each other and to the reference lines.

Use a stack container to pick your category in Visual Analytics08

How is the stack container implemented?

Simply drag and drop the Stack Container object from the Objects tab on to your report. Then, drag and drop the different objects into the stack container. In my example, I added two bar charts and a line chart. From the stack container’s Properties tab you can order the objects you added to the stack container by using the up and down arrows.

Use a stack container to pick your category in Visual Analytics09

How do you name the stack container objects?

These are the individual Names of each visualization object from the Properties tab. In this screenshot, I have the first bar chart selected, and I named this bar chart Product Line.

Use a stack container to pick your category in Visual Analytics10

You can also select different navigation properties for the stack container:

  • Navigation control location: Top left, Top Center, Top Right, Bottom Left, Bottom Center, or Bottom Right
  • Navigation button type: Buttons, Links, or Dots.

Use a stack container to pick your category in Visual Analytics11

Just like in the pick your metric blog, you can use this report technique to allow your report users to pick either different metrics, categories or both!

The stack container is one of my favorite report objects and really provides an interactive reporting experience to examine and explore the data.

tags: SAS Professional Services, SAS Visual Analytics

Use a stack container to pick your category in SAS Visual Analytics Reports was published on SAS Users.

4月 282016
 

Look at the report below. Imagine being asked to allow your users to select which Measure, highlighted in yellow, they are looking at: Income, Expense or Profit. This is a frequent report requirement and I’m going to outline just one of the ways you can design your report to satisfy this request using parameters.

In a previous blog, I talked about Using parameters in SAS Visual Analytics reports to prompt users to drive either an aggregated measure or calculated item. This example will allow your users to dynamically select which measures they want to see in their visualizations.

parameters to pick your metric in Visual Analytics Reports1

Steps

  1. Create the custom category to drive the button bar
  2. Create the parameter to hold the button bar’s selection
  3. Create the calculated data item that will hold the selected measure’s value
  4. Add report objects and assign roles

Step 1: Create the custom category to drive the button bar

On the Data tab, use the down menu and select New Custom Category….

Next, from the New Custom Category dialogue, select any category that has a cardinality greater than the number of metric choices you want to give your user. In this example, we will allow our report users to select between Revenue, Expense and Profit, so we have 3 options. Therefore, select a category with a cardinality greater than 3, so 4 or more will work.

parameters to pick your metric in Visual Analytics Reports2

The next part might seem awkward, but this prevents us from having to load a separate table into LASR. If you have the role and capabilities to load data into LASR then you could load a 3-row table that contains one column with the entries Revenue, Expense and Profit, and you could create your control object from that data source. However, you then create the dependency that both tables must be loaded to LASR for the report to work. The technique outlined in this blog allows us to use just this one data source, but restricts the placement of control object. Using this technique means that you cannot use this control object as a report or section prompt. IF you need to use this control as a report or section prompt then you will need to load a separate table.

Otherwise, follow along.

Name your custom category List of Measures. Next, create the labels of the measures you wish your report users to select from. Again, in my example, I want to allow my report users to pick either Revenue, Expense or Profit. Hint: Double click on Label 1 to rename it then use the New label button to add others.

Next, drag and drop at least one value into each custom category label grouping. The custom category data item will only allow you to save it once each category label grouping has a value. You may leave the radio button default Group remaining values as Other selected.

Finally, click OK to save your new custom category.

parameters to pick your metric in Visual Analytics Reports3

Step 2: Create the parameter to hold the button bar’s selection

Now that we have the custom category to feed the button bar’s values, we need to create a parameter to hold the button bar’s selection. From the Data tab, use the drop down menu and select New Parameter….

Select the Type Character and give your parameter a meaningful name. You can leave the current value, or default value, blank. When we assign the parameter to the button bar the value will be populated upon selection.

parameters to pick your metric in Visual Analytics Reports4

Step 3: Create the calculated data item that will hold the selected measure’s value

Here we need to create a calculated data item that will hold the value of the selected measure. This is the measure we will use in our table and graph objects. In pseudo code, we want to create a new measure that

If user selects "Expense" Return <Expense>
Else, If the user selects "Profit" Return <Profit>
Else Return <Revenue>

From the Data tab, use the drop down menu and select New Calculated Item….

parameters to pick your metric in Visual Analytics Reports5

Then use the Visual or Text editor to create a new calculated item named Measure.
Use nested IF…ELSE statements from the Boolean operators and the x = y statement from the Comparison operators.

parameters to pick your metric in Visual Analytics Reports6

Step 4: Add report objects and assign roles

Now we can add our report objects to our report. IMPORTANT: With our technique of using an unrelated category as the source of our custom category we cannot put our button bar in the report or section prompt areas. If we put the button bar in either the report or section prompt areas it would automatically filter the data and we would not get the intended results. DO NOT put the button bar in the report or section prompt area.

In this sample report, you can see I’ve added the Button Bar Control object, the Bar Chart, Crosstab and Line Chart objects to the report area. I want to narrow this section by year, so I have included a Drop-Down List Control to the section prompt area.

parameters to pick your metric in Visual Analytics Reports7

Now let’s look at the role assignments for our various objects. Here is what the report looks like before any style enhancements:

parameters to pick your metric in Visual Analytics Reports8

Drop-Down List Control Object

parameters to pick your metric in Visual Analytics Reports9

Button Bar Control Object

This is where we want to assign our newly created custom category and save that selection to our parameter. This will give us all the categories of our custom category, including the “Other” category.

parameters to pick your metric in Visual Analytics Reports10

Next, we will need to add a filter on this object to remove the “Other” category. From the Filters tab, add a filter for the List of Measures category and deselect the “Other” category.

parameters to pick your metric in Visual Analytics Reports11

Bar Chart, Crosstab and Line Chart

Use our new calculated item as the measure for each of the Bar Chart, Crosstab and Line Chart.

parameters to pick your metric in Visual Analytics Reports12

There is one interaction, where the Bar Chart filters the Crosstab.

parameters to pick your metric in Visual Analytics Reports13

And here is what the report looks like after I’ve altered some of the objects’ styles from the Style tab. I colored the selected bar value to coordinate with the rest of the report objects.
parameters to pick your metric in Visual Analytics Reports14

In this screenshot, I’ve selected the Promotional Product Line.

parameters to pick your metric in Visual Analytics Reports15

Other Applications

As you can envision, this technique can be used for more than just metrics, you could also use this to allow your users to pick a category to use in your objects! Or both.

Just bear in mind that you are restricted to using the Control Objects that support parameters. This includes:

  • Text Input
  • Button Bar
  • Drop-Down List

Slider (single-point only)

 

 

 

 

 

tags: SAS Professional Services, SAS Visual Analytics

Use parameters to pick your metric in Visual Analytics Reports was published on SAS Users.

9月 162015
 

The SAS Visual Analytics 7.2 release introduced context sensitive URLs for VA reports which means we can now directly pass parameter values in the URLs! This opens the door and allows for greater flexibility when needing to use a URL to access a VA report.

One use would be if you want to include a direct URL with particular parameter values in a third-party portal or custom application. Another use could be distributing different URLs with varying parameter values depending on the user’s Region interest or Product interest and allowing that person to save the URL as a link in the Hub. That way, no matter what values are used to save the report, the user will always open the report with their region and/or product selected.

Let’s look at what needs to be in place.

Configure Parameters

All parameters require a control object so that the user can select a value for the parameter. For additional information on the supported control objects for parameters please check out my Using parameters in SAS Visual Analytics blog. The optional role is the Category or Measure role. This role determines if the control object will give the user a pre-determined list of available values depending on the type of control object used.

Here are some examples:

Button Bar
On the Roles tab, I assigned Facility Region to the Category role which results in the button bar displaying the available Regions, i.e. East, North, South and West. Then I assigned the Region Parameter to the Parameter role. This means that the choice of the button bar will be stored in the Parameter named Region_Parameter, notice that a character parameter does not require a current (or default) value.

Parameter1
Parameter2

Slider
On the Roles tab, I assigned Unit_Yield_Multiplier_Parameter to the Parameter role. I did not assign a measure to the Measure/Date role because I wanted the parameter’s minimum and maximum values to drive the available values of the slider. Notice that a numeric parameter requires a minimum, maximum and current (or default) value.

Parameter3

Build URL
Now that we have our parameters in place we can build the VA report URL. There are two styles of URLs, one with the VA Viewer banner and one without the banner. If not already logged into VA, the user will be prompted for credentials when the URL is clicked. To by-pass a log in, there are Guest Access URLs which will not prompt for credentials but then the user is restricted to the Guest Access VA Viewer role capabilities.

Parameter4

Here are the base URLs:
With Banner
http://<server>:<port>/SASVisualAnalyticsViewer/VisualAnalyticsViewer.jsp?

For Guest Access
http://<server>:<port>/SASVisualAnalyticsViewer/guest.jsp?

 

Without Banner
http://<server>:<port>/SASVisualAnalyticsViewer/VisualAnalyticsViewer.jsp?reportViewOnly=true&

For Guest Access
http://<server>:<port>/SASVisualAnalyticsViewer/VisualAnalyticsViewer_guest.jsp?

 

Here are the parameters used to populate a fully qualified VA report URL:

  • reportName
  • reportPath
  • name value pair for Parameter1 …
  • name value pair for ParameterN

Here is an example of using the base URL with the VA banner and plugging in the parameters:

http://<server>:<port>/SASVisualAnalyticsViewer/VisualAnalyticsViewer.jsp?
reportName=report%20name&reportPath=metadata%20location&Parameter1=value&Parameter2=value

How to populate these base URLs with the report name, report path and parameters? Let VA do some of the work for you! From VA Designer, select File then E-mail… this will bring up a window with a generic URL to the VA report.

Parameter5

This URL will have the full path to the report already encoded for us. Look at the value after the location parameter.

http://sasserver05.race.sas.com:7980/SASVisualAnalytics/report?location=%2FGATE%2FCaseStudy%20Playpen%2FReporting%2FReports%2FReport%20-%20Parameters&type=Report.BI&section=vi1

We can pull out two of the URL parameters we need from the location parameter. This gives us:

reportName = Report%20-%20Parameters
reportPath = %2FGATE%2FCaseStudy%20Playpen%2FReporting%2FReports%2F

 

Next, we need to select the report’s parameter name value pairs we want to use.

Region_Parameter = North
Unit_Yield_Multiplier_Parameter = 1.2

Putting it all together in the banner URL gives us:

http://sasserver05.race.sas.com:7980//SASVisualAnalyticsViewer/VisualAnalyticsViewer.jsp?reportName=Report%20-%20Parameters&reportPath=%2FGATE%2FCaseStudy%20Playpen%2FReporting%2FReports&Region_Parameter=North&Unit_Yield_Multiplier_Parameter=1.2

 

Now you can adjust the values of your parameters and distribute this custom VA report URL as desired.

Some considerations to keep in mind include:

  • Cannot pass a prompt or control object value alone, each control object must have a parameter associated with its Parameter Role
  • Only supports available parameter type and control object combinations, i.e. no multiple selection control objects or date values

For additional information on the supported control objects for parameters please check out my Using parameters in SAS Visual Analytics blog.

tags: SAS Programmers, SAS Visual Analytics

Accessing VA Reports with Parameterized URLs was published on SAS Users.