BookmarkSubscribeRSS Feed
haneesh312
Fluorite | Level 6

I would like to aggregated field , which is the difference in percentages between two groups in a category using a calculated fiedls in SAS VA .

 

example:

Data

A

B

A

C

A

B
A

A

B

A

 

% of A -60%

% of B - 30%

 

difference -30%

 

I want difference field  to be caluculated in a field and should be able drill up and down

 

1 REPLY 1
PetriRoine
Pyrite | Level 9

Hello @haneesh312 ,

 

Have you tried creating two new calculated items, one for As and one for Bs, and then calculate the difference?

Something along the lines:

 

New calculated item for As:

IF (Category = 'A' )
RETURN Measure
ELSE 0

And a similar for Bs.

 

Then a new measure to calculate the difference between these two. Of course you need to take care of the percentage of total also.

 

Best regards,

Petri

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 1 reply
  • 582 views
  • 0 likes
  • 2 in conversation