Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to pulling Dimensions dynamically with simple KPI

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

0 Replies