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!!
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9.
Lock in the best rate now before the price increases on April 1.
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.