3 Replies Latest reply: Jan 17, 2018 6:49 PM by Ian Cornish RSS

    Variable in Set Analysis

    Josh Pinfold

      Hi Guys,

       

      I have a variable which returns a SubSubCategory that has shown the greatest percentage increase from last week. How can i use the results of this (a text string) in a set analysis.

       

      The variable expression is;

       

      FirstSortedValue(distinct

           {<Feedback_Day_Start={"<=$(=date(max(Feedback_Day_Start)-7))>=$(=date(max(Feedback_Day_Start)-13))"}>}

           SubSubCategory, -aggr(

                (count({<Feedback_Day_Start={"<=$(=date(max(Feedback_Day_Start)))>=$(=date(max(Feedback_Day_Start)-6))"}>}[Insight           Sentiment])

                /

                count({<Feedback_Day_Start={"<=$(=date(max(Feedback_Day_Start)-7))>=$(=date(max(Feedback_Day_Start)-13))"}>}[Insight      Sentiment]))-1,

      SubSubCategory))

       

      I thought I could use the variable as follows;

       

      count({<SubSubCategory={'=$(vMaxCategory%Change)'}>} [Insight Sentiment])