BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
tijanagilic
Obsidian | Level 7

Hi, I need help with creating a percentage.

 

The initial data, is created in SAS EG, in the following way

tijanagilic_0-1707400528849.png

 

I've created a new one - Broj klijenata - FIL, in the following way:

tijanagilic_1-1707400663279.png

Now that I'm trying to calculate the percentage of Broj klijenata - FIL / Broj klijenata, I'll get the following data.

tijanagilic_2-1707400802437.png

Wich is not correct.

 

Can someone tell me what I'm doing wrong and what I should do?

 

Thank you.

 

1 ACCEPTED SOLUTION

Accepted Solutions
Amulraj
Fluorite | Level 6

hi

 

can you tell me how you calculated the % data 
because when i try this percentage of Broj klijenata - FIL / Broj klijenat for MESEC 01-2024
"Broj klijenata - FIL" / Broj klijenat  i get 0.1590460897463151 if i format it to percentage i get 15.90460897463151 which is not the matching with the output.
I am assuming the issue is with % calculation 

View solution in original post

5 REPLIES 5
Amulraj
Fluorite | Level 6

hi

 

can you tell me how you calculated the % data 
because when i try this percentage of Broj klijenata - FIL / Broj klijenat for MESEC 01-2024
"Broj klijenata - FIL" / Broj klijenat  i get 0.1590460897463151 if i format it to percentage i get 15.90460897463151 which is not the matching with the output.
I am assuming the issue is with % calculation 

tijanagilic
Obsidian | Level 7

I'm calculating the percentage in the following way:

tijanagilic_0-1707402259358.png

 

Amulraj
Fluorite | Level 6

what is the aggregate type for these two variable- you can check it in the data, select the column and expand

tijanagilic
Obsidian | Level 7

Like this?

 

tijanagilic_0-1707404204609.png

 

EmilyB_SAS
SAS Employee

I believe you need to create the calculation as an aggregated measure so that you are calculating the percentage of the aggregated (summed) data for each date.

 

You can create the calculation like below. Replace MPG(City) and MPG(Highway) with your variables. Let me know if that works.

 

EmilyB_SAS_0-1707402815099.png

 

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 628 views
  • 0 likes
  • 3 in conversation