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: 
Elarbe
Contributor III
Contributor III

Set Analysis SUM() in Pivot Table on condition of date

Hello all,

I have a set of data with several projects (linked to IDs) and start dates. Some project IDs only occur once, starting from one date. Other IDs appear on multiple start dates because the project is larger and has "sub-projects", so to speak.

Accompanying project IDs are planned and realised quantities. I'm trying to create a pivot table that has the SUM() of the planned quantities on the same row as the date the project started.

The problem I'm having is that by using only SUM(), all the quantities associated with that project ID will be calculated and repeated on every row of all the dates as seen here:

Elarbe_0-1665051735061.png

So what I would need is for example, if the SUM() of the planned quantity for the ID that started on 07/25/2021 was 1135, that number would only be visible on the row for that date. 

I'm trying to think of a condition in set analysis for the start date to get the results I'm looking for, but so far nothing has worked.

//Sum({$<[StartDate]={}>}[plannedQuantity])

Does anyone know what I would need to put in {} for this to work? Or have a better idea?

Thank you.

Labels (3)
0 Replies