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.
Branch | City | Churn flag |
Mumbai | abc | 0 |
Mumbai | xy | 1 |
Mumbai | abb | 1 |
Mumbai | wer | 0 |
Delhi | fg | 0 |
Delhi | sd | 1 |
Chennai | er | 0 |
Chennai | ty | 0 |
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.
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.
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.
Thank you so much. Great help!!
Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.
Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.
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.