Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

aggr / count function problem

Hello QLikers!

Hope you can help me with my qliview problem.  I am not a programmer although I have undergone qlikview training for 2 days.  I basically can do simple formula but when it becomes complex I am a bit perplexed.  I don't know what to do next, that is why I am giving this to the expert out there and hopefully help me progress in may project.

Attached is the sample of my data and would appreciate any help from you guys!

BRIEF PREVIEW OF MY DATA

There are 3 sheets on it:

PIVOT - is the weekly data that I use in the load script

SD DRILLDOWN - is where I sort the number  versus a set of criteria

DATA - is the end project of what my data would look like

thanks in advance..

Rita

1 Solution

Accepted Solutions
sunny_talwar

I think you might not have added WEEK to your aggr dimension

Capture.PNG

View solution in original post

17 Replies
sunny_talwar

May be these

Total Count

Count({<Week={$(=MaxString(Week))}>} DISTINCT DEVICE)

Single Device

Count({<Week={$(=MaxString(Week))}, DEVICE = {"=Count(DEVICE) = 1"}>} DISTINCT DEVICE)

<6 Hrs

Count({<Week={$(=MaxString(Week))}, DEVICE = {"=Count(DEVICE) = 1"}, HOURS = {'<=6'}>} DISTINCT DEVICE)


>24 Hrs

Count({<Week={$(=MaxString(Week))}, DEVICE = {"=Count(DEVICE) = 1"}, HOURS = {'>6'}>} DISTINCT DEVICE)

Anonymous
Not applicable
Author

Hi Sunny,

I've tried your suggestions....

good thing to note is that it reflect the current week which is wk2..

unfortunately the numbers are not...

Capture.JPG

the numbers should be like this....

correct.JPG

any other ideas?

thanks for your fast reply....

sunny_talwar

Might help if you can share a sample app where we can test it out. Right now the Excel file you shared only had data for Week2... which makes it difficult to test. May be with some more data, we might be able to figure something out.

Anonymous
Not applicable
Author

forgive my ignorance but I could not seem to find the attached file button here..

oknotsen
Master III
Master III

Click on reply.

In the top-right corner, click on "Use advanced editor".

In the bottom-right corner, click on "Attach".

May you live in interesting times!
sunny_talwar

You can also look here

Uploading a Sample

Anonymous
Not applicable
Author

HI Sunny, thanks for that.

I have already attached my sample file, pls. advise if you are able to view it and hope you can help me work out  with my project.

thanks a lot!

sunny_talwar

What is the issue here? Is there a specific object which isn't working?

Capture.PNG

Anonymous
Not applicable
Author

the above sample is the WK6 data


what I would like to do is, even if I don't choose a particular week , the numbers will reflect the latest WEEK data....


See attached for sample..