Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Qlik community,
I want to count the number of dates that surpassed a certain minimal date per project. See the example below. With my current calculation it takes the date of the lowest date there is and apply this to all projects. But I want to calculate the minimal date of each project and then count the dates.
Hopefully someone can help me!
sum(aggr(if(Dateis>min(total<project> PlannedDate),1,0),project,Dateis))
Hi,
maybe you can calculate it in the script?
Example:
[DATES]:
Load * Inline [
Project, Date, Planned_Date
A,08.10.2022, 10.10.2022,
A,11.10.2022
A,12.10.2022
A,13.10.2022
B,09.11.2022, 12.11.2022
B,10.11.2022
B,11.11.2022
B,12.11.2022
];
Left join ([DATES])
Load
Project,
date(min(Planned_Date)) as MinPlanedDatePerProject
Resident [DATES] Group By Project;
Left join ([DATES])
Load
*,
(if(Date >= MinPlanedDatePerProject,1,0)) as DesiredOutput
Resident [DATES];
Drop Field Planned_Date;
You will recieve:
Kind regards
Samuel
sum(aggr(if(Dateis>min(total<project> PlannedDate),1,0),project,Dateis))