Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
ali_hijazi
Partner - Master II
Partner - Master II

Get the Value of the last invoice of a customer

Hello

I'm working on a retail dashboard

I have a pivot table in which I want to list the customers not served in the selected month and display the value of the last invoice of each customer

I came up with this expression but it is not giving me any number:

sum(

  {

  <

  CustomerCode = E(

  {

  <

  TrxType={'Sales'}

  ,CusNum = {"=Sum({<TrxType={'Sales'}>} ValueUSD)>0"}

  >

  } CustomerCode

  )

  ,TrxType={'sales'}

  ,YEAR=,MONTH=,MONTH_NUM=,MONTH_YEAR=,DAY=

  ,TrxDate={"=TrxDate=max({<TrxType={'sales'},YEAR=,MONTH=,MONTH_NUM=,MONTH_YEAR=,DAY=,TrxDate={'<=$(vEOM_LastMonth)'}>TrxDate"}

  >

  } Sales )

this expression is giving zeroes

if I remove the condition on the TrxDate I get results but I'm sure the result is wrong

I can walk on water when it freezes
0 Replies