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

Hello all,

I am working with Viya 3.4 and stuck with a calculated item. 

I need to create a calculated item which will be use in a "key value" object to show the results for overall and selected branch/city wise churn %. Data and expected results is like below. I need to show the result in "key value" object only, not in list or tabular object. Please guide how to create that required calculated item to get the result.

 

BranchCityChurn flag
Mumbaiabc0
Mumbaixy1
Mumbaiabb1
Mumbaiwer0
Delhifg0
Delhisd1
Chennaier0
Chennaity0
   
Churn flag 1 = Exited
Churn Flag 0= Active
  
   
Expected Result in SAS VA in "Key value" object  
Total churn %37.50% 
If select Mumbai from Filter then Churn %50% 

 

Thanks in advance.

1 ACCEPTED SOLUTION

Accepted Solutions
acordes
Rhodochrosite | Level 12

It depends on the context, if you want to have both aggregations in the same object like a cross table, then use base expression and intersection. 

 

pic2.pngpic1.pngpic.png

 

 

View solution in original post

2 REPLIES 2
acordes
Rhodochrosite | Level 12

It depends on the context, if you want to have both aggregations in the same object like a cross table, then use base expression and intersection. 

 

pic2.pngpic1.pngpic.png

 

 

shubha_da
Fluorite | Level 6

Thank you so much. Great help!! 

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
  • 2 replies
  • 524 views
  • 0 likes
  • 2 in conversation