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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Problem Sum

Hi,

I have a problem with Function "Sum"

I try to calculate "Stock UC a date" with this :

FirstSortedValue(aggr(DISTINCT Sum(Qte_UC_Stock_BDD)+ sum(Qte_PCU_STOJOU),Date_Mvt, Code_Article,Stat_2_Article),-aggr(Date_Mvt,Date_Mvt,Code_Article,Stat_2_Article ))

and

FirstSortedValue(aggr(DISTINCT Sum(Qte_UC_Stock_BDD)+ rangesum(Above(TOTAL (Sum(Qte_PCU_STOJOU)) , 0, RowNo())),Date_Mvt, Code_Article,Stat_2_Article),-aggr(Date_Mvt,Date_Mvt,Code_Article,Stat_2_Article ))

Capture.JPG

It's Ok for collapse or expand but my results is not good.

Normally subtract every operation of movement of the result obtained previously on "Stock UC a date"


Maybe anyone have an idea where is my problem?

10 Replies
Not applicable
Author

Thanks a lot Juan it's work perfectly

Best regards