Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Help needed: calculate Output (real and planned)

Hey everybody,

I need to calculate the planned and the real Output of Product in a certain Time Period. My Data Set is as follows:

RealDatePlannedDateProductID
03.11.201608.10.2016125-635

02.01.2016

08.02.2016126-236
20.10.2016-128-236
-05.06.2017158-360

The problem is that I need to count both dates for the same time period which I want to determine by a Listbox. This Period could contain several months in several years...I solved it for the situation that I choose only one month in one year, but i want need to choose flexibel time periods for my reports...

I tried the whole day to solve this, but didn´t find a solution. Please help me...

4 Replies
Anil_Babu_Samineni

What is the result set you are expecting from providing data

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Not applicable
Author

Thanks for your answer! I expect for any selection of a time period the Number of PlannedDates and the number of RealDates, which are included in the selected period.

I tried this:

=count( if(PlannedDate>weekstart(Min(Date)) AND DatumPlanEnde<weekend(Max(Date)), ProductID)

Not applicable
Author

Sry there was some of the German Code left:

I tried this:

OutputPlanned=count( if(PlannedDate>weekstart(Min(Date)) AND PlannedDate<weekend(Max(Date)), ProductID)

with Date beeing the selected Time Period

swuehl
MVP
MVP

A canonical date may solve your requirement:

Canonical Date