SAS Data Integration Studio, DataFlux Data Management Studio, SAS/ACCESS, SAS Data Loader for Hadoop and others

How to create a bar chart in Profile - Visualizations in a proper way I want?

Reply
Regular Learner
Posts: 1

How to create a bar chart in Profile - Visualizations in a proper way I want?

Hello,

 

I have just started using SAS Dataflux for Data analysis, so I am not too familiar with work arounds in SAS.

 

I have created a profile of a table with just two fields. One field consists of unique code for products and another field consists of date these products were created on. I want to count products for each month of each year and present it in a graph. I have managed to create a graph for numbers of products for each year but having trouble to do it for each month of each year.

bar chart.jpg

 

Below is how a table looks like where field ERSDA is for date

table.jpg

I wrote a custom metric as below

public integer articleCount2013
public integer articleCount2014
public integer articleCount2015
public integer articleCount2016
public integer articleCount2017
articleCount2013 = 0
articleCount2014 = 0
articleCount2015 = 0
articleCount2016 = 0
articleCount2017 = 0
	
	if left(`ERSDA`,4)=="2013"
	begin
		articleCount2013 = articleCount2013 + 1
	end
		
	else if left(`ERSDA`,4)=="2014"
		begin
		articleCount2014 = articleCount2014 + 1
	end		
	else if left(`ERSDA`,4)=="2015"
		begin
		articleCount2015 = articleCount2015 + 1
	end	
	else if left(`ERSDA`,4)=="2016"
		begin
		articleCount2016 = articleCount2016 + 1
	end	
	else if left(`ERSDA`,4)=="2017"
		begin
		articleCount2017 = articleCount2017 + 1
	end	

 

Could anyone please assist in doing this a better way and creating a graph with numbers of products for each month of each year ? And, I am using DatafluxData Management Studio Version : 2.4.0.22

 

Thanks in advance for you help.

Cheers

Super User
Posts: 19,789

Re: How to create a bar chart in Profile - Visualizations in a proper way I want?

Dataflux is used for data management, less so visualization, usually that would be Base SAS. 

I've moved this thread to the Data Management forum, where Dataflux users are more likely to see it. 

Ask a Question
Discussion stats
  • 1 reply
  • 123 views
  • 0 likes
  • 2 in conversation