Obsidian | Level 7

## SAS VA - Percentage

Hi, I need help with creating a percentage.

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

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

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

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
Fluorite | Level 6

## Re: SAS VA - PERCENT

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

5 REPLIES 5
Fluorite | Level 6

## Re: SAS VA - PERCENT

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

Obsidian | Level 7

## Re: SAS VA - PERCENT

I'm calculating the percentage in the following way:

Fluorite | Level 6

## Re: SAS VA - PERCENT

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

Obsidian | Level 7

Like this?

SAS Employee

## Re: SAS VA - Percentage

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.

Discussion stats
• 5 replies
• 665 views
• 0 likes
• 3 in conversation