Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
StefanSonntag
Contributor II
Contributor II

Summarize Last Values

It's likely something not too complicated but I bent my mind for the last 3 hours and could not get to the right solution, hence checking in with the swarm 😉

My table looks like this

Date, Product ID, Amount where there is only 1 amount per product per day, but there may be a varying number of products per day and the number of days in a week may be less than the number of calendar days in a week (7). So for example

Week1, Jan 1, 4711,100

Week 1, Jan 2, 4711,50

Week 1, Jan 2,4712, 150

Week 1,  Jan 2, 4713, 100

Week 1,  Jan 3, 4712, 300

Week 1,  Jan 4, 4713, 250

Week 1,  Jan 5, 4713,  175,

Week 2, Jan 8, 4711, 100

Week 2, Jan 8  4715, 250

Week 2, Jan 8, 4712, 250

I need to calculate the sum of product amounts for all products on the last day given in any week (not the last calendar day of a week!) , so in the example above the response required would be

Week 1, 175

Week 2, 600

 

 

Thanks,

Stefan
Labels (1)
1 Reply
joaopaulo_delco
Partner - Creator III
Partner - Creator III

Hi @StefanSonntag !

           The right path to find you goals is using the "firstsortedvalue" function.

https://help.qlik.com/en-US/sense/November2020/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/Basic...

 

Help users find answers! Don't forget to mark a solution that worked for you!