0 Replies Latest reply: Aug 24, 2016 4:02 PM by mazhar hussain RSS

    How to pulling Dimensions dynamically with simple KPI

    mazhar hussain

      How to pulling Dimensions dynamically with simple KPI

       

      I have Insurance companies with no particulate number, could be 10 to 20 companies and the arrow will compare the current two months selected value with the previous two months value.

       

      Dim = [Ins Companies]

      if([Ins Companies]<>'Null',[Ins Companies],Null())

       

      Measure :

      if(getselectedcount(MonthYear)=0, Count(DISTINCT {<[Ins Companies]=

      ,MonthYear={'$(=max(mxDate))'}

      >} [ID]),

      Count(DISTINCT {<[Ins Companies]=

      ,[Date]={">$(varMinSelectedDate)<=$(varSelectedDate)"}

      >} [ID])

      )

       

      Arrow calculation:

      if((count({$<[Ins Companies]=,

                   MonthYear={$(='"'&concat(distinct date(Addmonths

        (MonthYear,-Getselectedcount(MonthYear)) ,'MMM-YYYY') ,'","') &'"')} >} [ID]) > 0

                 OR count({$<[Ins Companies]=>} [ID]) > 0),         

          if((count({$<[Ins Companies]=,MonthYear={$(='"'&concat(distinct date(Addmonths

        (MonthYear,-Getselectedcount(MonthYear)) ,'MMM-YYYY'),'","')&'"')}>} [ID]) =

               count({$<[Ins Companies]=>} [ID])),'resize horizontal icon',

           if((count({$<[Ins Companies]=,MonthYear={$(='"'&concat(distinct date(Addmonths

               (MonthYear, -Getselectedcount(MonthYear)) ,'MMM-YYYY'),'","')&'"')}>} [ID])>

                  count({$<[Ins Companies]=>} [ID])),'arrow up icon','arrow down icon')

         )

      )

       

      Its a three Metrix in one simple KPI