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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
arusanah
Creator II
Creator II

help with arrow expression

i'm trying to show arrows next to my calc . I have Field1 field  which has 100+ values , based on my date selection I want to compare current month number with previous month and show arrow based on changes between current and previous month. This is the expression I am using but it is not providing the results. Any help is appreciated

if(

    (count({$<Field1=,

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

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

           OR count({$<Field1=,[Date]={">$(varMinSelectedDate)<=$(varSelectedDate)"}>} [ Identifier]) > 0

     ),

    

    // if ((count({$<MonthYear={$(='"'&concat(distinct date(Addmonths(MonthYear,-Getselectedcount(MonthYear)) ,'MMM-YYYY'),'","')&'"')},Field1=>} [Recipient Identifier]))

//  - (count({$<[Date]={">$(varMinSelectedDate)<=$(varSelectedDate)"},Field1=>} [ Identifier])) = 0,    

     if(

     (count({$<Field1=,MonthYear={$(='"'&concat(distinct date(Addmonths

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

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

  ),'resize horizontal icon',       

        if(

      (count({$<Field1=,MonthYear={$(='"'&concat(distinct date(Addmonths

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

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

       ),'arrow down icon','arrow up icon'

     )

      )

)

5 Replies
othniel2014
Contributor III
Contributor III

Could you show a capture or attach an application?

I think it is more or less what the problem

vishsaggi
Champion III
Champion III

Can you share a sample app to look into if possible ?

jonathandienst
Partner - Champion III
Partner - Champion III

Put the calculation in expression 1, and then in expression 2:

=If(Column(1) >= 0, 'qmem://<bundled>/BuiltIn/arrow_n_g.png', 'qmem://<bundled>/BuiltIn/arrow_s_r.png')

And set Representation on the Properties  | Expressions tab to Image and adjust the sizing options to suit.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
arusanah
Creator II
Creator II
Author

Jonathan,

I am using this in qliksense , how do we call one expression in another in qliksense . had it been Qlikview , we can do it but qliksense not sure how to do that

vishsaggi
Champion III
Champion III

Hello Archana,

Could you repost this thread in Qliksense forum for a quicker help.

Qlik Sense Forums

Thanks,
V.