Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikster
Contributor III
Contributor III

Count of mindate works but not sum. Ingoing balance calculation

Hi,

I have an expression that counts the CustId of the variable vMinDate which is set as if it's the first row. Otherwise it sums the Above row. This works without any problems when doing a count. But when I'm trying to sum the Invoiced Value it just doesn't work

Variable:

vMinDate=Min(Date)

Working expression:

if(RowNo()=1,Count({$<FlagDayActive={1},Date={'$(vMinDate)'},Year=,Month=,Week=>}DISTINCT CustID),
Above(FirstSortedValue(AGGR( Count({$<FlagDayActive={1}>}DISTINCTCustID), Date), -AGGR(Date,Date))))

 

This expression doesn't work

=if(RowNo()=1,sum({$<FlagDayActive={1},Date={'$(vMinDate)'},Year=,Month=,Week=>} INVOICE_VALUE),
Above(FirstSortedValue(AGGR( Sum({$<FlagDayActive={1}>} INVOICE_VALUE), Date), -AGGR(Date,Date))))

 

This is how the results from the working expression of count CustID looks.

qlikster_0-1709716825823.png

 

Labels (1)
  • SaaS

1 Reply
Dataintellinalytics

When you say expression doesn't work is it giving error or wrong result ?

Please share sample mock data and expected output.