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

get sum of count 30th date before given date in qlikview

hi,

I had a condition where i need to get the count of viewers for the given date and 30 days before the given date(only 30 th day before the given date).

I need to represent this in a straight table as below.

Timestamp          count          count(30 days ago) percentage

please help me how to acheive this.

1 Solution

Accepted Solutions
Gysbert_Wassenaar

See attached qvw.


talk is cheap, supply exceeds demand

View solution in original post

15 Replies
tresesco
MVP
MVP

Could you post a sample qvw explaining the expected output?

Anonymous
Not applicable
Author

For current date , use the expression

count({$<date field={$(=date(today()))}>}viewers)

For date previous 30 days, use the expression:

count({$<date field={$(=date(today()-30))}>}viewers)

Hope this helps you

Regards

Nitin

Anonymous
Not applicable
Author

Hi Try something like this :


for today:

Count({<YourDate={'$(Date(Today())) '}>} VIEWERID)

for 30 day before:

Count({<YourDate={'$(Date(Today() - 30))'}>} VIEWERID)

anant

Not applicable
Author

Not applicable
Author

Gysbert_Wassenaar

See attached qvw.


talk is cheap, supply exceeds demand
tresesco
MVP
MVP

Easier would be to do in the script using much known AsOfDate logic. If you have to do it in the front end, it would a bit complex, but possible like the attached sample.

PFA

Not applicable
Author

hi,

can you please post me the logic. as i am working on personal edition and not able to access your files

Not applicable
Author

hi,

can you please post me the logic. as i am working on personal edition and not able to access your files