Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

5abi0001
New Contributor III

Get count(Problems) within a period

Hey!

I have some issues, where i need ur help!

What i want to do is: I have a table with Groupnames which are linked to a ProblemNumber - furthermore i have a CreatedDate and ClosedDate (both of them are in numberic format). Furthermore i have two Variables vFromDate and vToDate. With these variables i can seth the range of the data i want to look at. For example if vFromDate is 2018-01-01 and vToDate is 2018-01-31 - i can see all problems which are created within this period. Now what i want is, to get only these groups and the number of problems they where linked to within this period. Based on them i want to now the top 10 groups and want to color them in a different colour in my diagram, because i have 20 groups and to colour them is a little bit annoying.

12 Replies
YoussefBelloum
Esteemed Contributor

Re: Get count(Problems) within a period

Hi,

maybe you need to use the Rank() function and apply it to your existing expression.

can you add more details, like the expression used, the type of objects you use ?

5abi0001
New Contributor III

Re: Get count(Problems) within a period

Hey, i have no existing expression :-/ .. i uploaded u a testfile.

YoussefBelloum
Esteemed Contributor

Re: Get count(Problems) within a period

Your expression is: Count({<OpenDate= {">=$(StartDate)<=$(EndDate)"}>} DISTINCT ProblemID)


Please find attached.

the result if on the column of the red table

5abi0001
New Contributor III

Re: Get count(Problems) within a period

Hey, super! This is exact what im looking for .. now i want to give them based on their rank colours in the diagram (Formula, Backgroundcolor) .. for the first 10 i want to give spezific colors and for the rest it should be a green tone which will be brighther, if the rank goes to 20! :-)

YoussefBelloum
Esteemed Contributor

Re: Get count(Problems) within a period

ok, i should then let all the lines appear, because now I'm limiting the view for only the TOP 10 for each Group and for each Min/Max dates.

I'll send you another version

5abi0001
New Contributor III

Re: Get count(Problems) within a period

Okey, i will be waiting! :-) Thank u in advance.

YoussefBelloum
Esteemed Contributor

Re: Get count(Problems) within a period

Please find attached

5abi0001
New Contributor III

Re: Get count(Problems) within a period

Hey i think my requirement was not clear enough :-/ .. i want to color the dimension group in ma diagram CH03 in these colours based on the ranking.

YoussefBelloum
Esteemed Contributor

Re: Get count(Problems) within a period

Please find attached

Let me know

Community Browser