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

SET analysis - P function

hello

I am new here so be nice

I have built a QV dashborad for all the Engineering changes in my company (let's call them ECOs - Engineering Change Request).

Each ECO has status change date (per status: open--> approved --> implemented) that is connected to a calendar.

I would like to present according to the selected time period (month/quarter/year) all the ECO that were alive at this period.

Meaning - if the user chooses Q1/15 - I would like to count (in a graph) all the handled ECOs, including the ECOs that had no status change in this period

(for example: count the ECOs that were opened in Q4/14 and got the next status on Q2/15 (and had no status change during Q1/15).

I tried using the P function in Set analysis.

in the phrase below i tried to count al the ECOs that belong to the group of all the ECOs that got status open before the end of the selected period and NOT belong to the the group of ECOs that were closed before the start point of the selected period.

=Count( {$<ECO_ID = P({$<Status_Name={'Open'},Change_Date={"<=$(vEnd_Period)"} >} )

-

P({$<Status_Name={'Implemented & Closed' , 'PL Reporting'},Change_Date={"<=$(vStart_Period)"} >} )>} Distinct ECO_ID )

obviously I was wrong because i get the wrong number..

can anyone tell me where I was wrong...?

Or suggest a different solution for this (maybe in the script).

Thanks in advanced

Hofit

6 Replies
Anil_Babu_Samineni

Really very difficult to me, would you provide sample.

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
Anonymous
Not applicable
Author

May be

Count( {$<ECO_ID = P({$<Status_Name={'Open'},Change_Date={"<=$(vEnd_Period)"} >} ECO_ID )

-

Count(P({$<Status_Name={'Implemented & Closed' , 'PL Reporting'},Change_Date={"<=$(vStart_Period)"} >} )>} Distinct ECO_ID )

or

May be check date formates resulting in vEnd_Period, vStart_Period whether they result same format as Change_Date!!

MarcoWedel

please post some sample data and your expected result.

thanks

regards

Marco

Not applicable
Author

hi,

thanks for your willingness to assist.

I am not sure I can upload the file here - security issues of my company.

in the meantime, i am checking the date format issue again (for the change date vs. the End period variable)

i see it still causes me issues..

anyway,

I just want to understand if the expression I wrote is basically correct - meaning if { P1( )-P2()  } gives me the group of the ECOs that are related to P1 group and not related to P2 group.

thanks You very much for trying to assist

Not applicable
Author

Thanks

I see the date format is still causes me some issues here,..

will check it again.

Not applicable
Author

thanks Marco

I cannot upload the data due to security issues for my company.