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

Simple Excel chart not able to develop in SAS Visual Analytics

Reply
Occasional Contributor
Posts: 7

Simple Excel chart not able to develop in SAS Visual Analytics

Hi Everybody

 

I am trying to create a simple Excel Bar chart in SAS Visual Analytics. I have to make year on year comparison for the values of different kinds of measures in a bar graph.

 

I have attached the excel graph with the data.

It may be very simple but its urgent.

 

Kind Regards

Soumya Sen

SAS Super FREQ
Posts: 296

Re: Simple Excel chart not able to develop in SAS Visual Analytics

For convenience, here is the graph from Soumya's spreadsheet:

 

bar.png

 

The bar chart has 3 measures, a group variable, but no category variable.

 

Anyone have a suggestion of how this can be created in VA?

 

Thanks,

Sam

Regular Contributor
Posts: 173

Re: Simple Excel chart not able to develop in SAS Visual Analytics

Hi Soumya,

Its possible while making a new calculated field per year.  I did cut off the left axis...

16-02-2016 17-03-38.png

Use the following code per year (F.Year in our case)

IF ( 'F.Year.'n = Year(DatePart(Now())) )
RETURN 'Sal.Val.€.'n
ELSE 0

 

And this one for the last year.

IF ( 'F.Year.'n = ( Year(DatePart(Now())) - 1 ) )
RETURN 'Sal.Val.€.'n
ELSE 0

 

Drag both variables into the bargraph and magic happens....

Greetings  Peter

 

 

 

Occasional Contributor
Posts: 7

Re: Simple Excel chart not able to develop in SAS Visual Analytics

I have developed the following variables:

My variable is named ‘Year’ so used Year('Year'n): so dint get confused on that.

  1. For measure variable loss and for 2015 I have created a new variable called FY2015_loss

IF ( Year('Year'n) = ( Year(DatePart(Now())) - 1 ) )

RETURN 'loss'n

ELSE 0

 

  1. For measure variable loss and for 2016 I have created a new variable called FY2015_loss

IF ( Year('Year'n) = Year(DatePart(Now())) )

RETURN 'loss'n

ELSE 0

 

 

  1. For measure variable revenue and for 2015 I have created a new variable called FY2015_revenue

IF ( Year('Year'n) = Year(DatePart(Now())) )

RETURN 'loss'n

ELSE 0

 

  1. For measure variable revenue and for 2016 I have created a new variable called FY2016_revenue

IF ( Year('Year'n) = Year(DatePart(Now())) )

RETURN 'loss'n

ELSE 0

 

 

But when I am assigning the variables the visual is not getting generated.

Please find attached in the last page what is the error.

 

 

Occasional Contributor
Posts: 7

Re: Simple Excel chart not able to develop in SAS Visual Analytics

Also one thing how did you cut the left axis

Regular Contributor
Posts: 173

Re: Simple Excel chart not able to develop in SAS Visual Analytics

The axes have been cut off for this screenprint.
Not that VA could do this .
Greetings
Regular Contributor
Posts: 173

Re: Simple Excel chart not able to develop in SAS Visual Analytics

[ Edited ]

You have not used a category yet, and you must use it to have the bars to show.
Thats what i see in your screen print, the rest seems to be ok.
Greetings

Occasional Contributor
Posts: 7

Re: Simple Excel chart not able to develop in SAS Visual Analytics

Thanks but in the excel we are not using any category .

Regular Contributor
Posts: 173

Re: Simple Excel chart not able to develop in SAS Visual Analytics

I am very confused now.

Your categories are  Expence, Debt and CostOfDebt.....

Greetings

Occasional Contributor
Posts: 7

Re: Simple Excel chart not able to develop in SAS Visual Analytics

But Thanks a lot.

Using a category I can arrive at that.

Occasional Contributor
Posts: 7

Re: Simple Excel chart not able to develop in SAS Visual Analytics

One thing . My Measure values are under Expense, Debt . They are not categories /neither they appear under category list in SAS VA

Occasional Contributor
Posts: 7

Re: Simple Excel chart not able to develop in SAS Visual Analytics

Sorry to confuse you.

 

In my excel sheet you will find Year as my category.

 

And Expense ,Debt and Cost of Debt as the measure variables. So they dont appear under the category list.

 

Kind Regards

Soumya Sen

Ask a Question
Discussion stats
  • 11 replies
  • 779 views
  • 0 likes
  • 3 in conversation