BookmarkSubscribeRSS Feed
balraj
Quartz | Level 8

Hi Community,

 

I'm using SAS VA 7.2 my sample data is as follows:

 

Type          ItemName              Value

Income      Services                  25000

Income      interest received     46500

Income      interest -banks        32000

Expense    Transit charges       23000

Expense    Internet charges      9000

Expense    Audit Fees               6000

Expense    Bank charges          11000 

 

How can I calculate Percentage of each Expense from Total Income?

like: 

% Transit charges from Total Income=? 

% Internet charges from Total Income=? and so on...

 

Regards,

Balraj

 

5 REPLIES 5
ShivamKS
Obsidian | Level 7

Hi

 

Is this your requirement?

 

result.PNG

 

 

 

balraj
Quartz | Level 8

Yes Spot on..!!! @ShivamKS,

 

I've implemented till what you've implemented, was about to update that.

Now I'm struck at this point, let me explain:

let suppose sum percent expenses of income =47.35 

where as what i'm trying to achieve is it should be equal to 100% of expenses

i.e., sum percent expenses of income = 100% = Total Expenses %

 

This is what i'm able to achieve:

expen# - Copy.png

ShivamKS
Obsidian | Level 7

In the pie chart that values are % of total expense and not % of total income, that is why when you total them they give 100%.

 

They are two different calculations isn't it? Not sure if i am missing something.

ShivamKS
Obsidian | Level 7

Hi

 

In order to get values same as pie chart like:

 

imag2.PNG

 

The calculation:

 

imag3.PNG

 

 

balraj
Quartz | Level 8

Wow Thank you very much @ShivamKS now I've understood how it is working internally.

 

And I've also understood that SUM of % of Expense from Total Income will not be equal to 100%, as it is calculating separately for 

each group.

Is there any alternate method to achieve the same?

 

Please share some inputs on this.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 1609 views
  • 2 likes
  • 2 in conversation