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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
ali_hijazi
Partner - Master II
Partner - Master II

Expression reuse

Hello Got a pivot table showing AR Ageing (check attached) document

in the copy that I've attached I have the Invoice Number 84035 with amount 421,444.26 and No. of Days =3

then I got the remaining invoices with number of days = 2 and 1

What I want now is to create a new pivot table showing for each customer the amount of invoices whose ageing days is between 1, and 2

and those whose ageing is >2

i.e. the pivot table shows customer name, then expression 1 sum(amount) where ageing is between 1,and 2 and a second expression showing the amount where ageing is >2

i.e. for the available customer show:

421,444.26

and on the second column show

25029.54

of course by reusing the expression used to calculate ageing

Please advise

I can walk on water when it freezes
Labels (1)
14 Replies
sunny_talwar
MVP
MVP

Is this what you want?

Capture.PNG

ali_hijazi
Partner - Master II
Partner - Master II
Author

you didn't attach the solution

I can walk on water when it freezes
sunny_talwar
MVP
MVP

I have attached the qvw file above

Capture.PNG

vinieme12
Champion III
Champion III

instead of Creating new tables , why not re-use the same table and add a Listbox for the user to filter on?

Create an expression listbox for users to filter on

=AGGR(

  $(vCustomerAgeing_OpenInvoice_Days)

,InvoiceNum)

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
ali_hijazi
Partner - Master II
Partner - Master II
Author

I don't want this as dimension

I want to create separate expressions

in fact on the real dashboard I want to have the classification as columns:

31-60             61-90                   91-120                 >120

or something like this

check.jpg

I asked for 1&2 and >2 to match the available data in the copy I shared with you

I can walk on water when it freezes
ali_hijazi
Partner - Master II
Partner - Master II
Author

I want to have pre-defined brackets

<= 30    31-60            61-90     91-120          >120

I can walk on water when it freezes
vinieme12
Champion III
Champion III

try Expression listbox as

= replace(AGGR(class($(vCustomerAgeing_OpenInvoice_Days),30),InvoiceNum),'<= x <',' - ')

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
ali_hijazi
Partner - Master II
Partner - Master II
Author

and additional expressions may be added to the chart other than these required right now

I can walk on water when it freezes
vinieme12
Champion III
Champion III

UPDATED EXPRESSION

= replace(AGGR(if($(vCustomerAgeing_OpenInvoice_Days)>120,'>120',class($(vCustomerAgeing_OpenInvoice_Days),30)),InvoiceNum),'<= x <',' - ')

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.