Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Need help on count

Hi,

Thank you for all past solutions!

Now on attached qvw file, i have got two question (see on file) which i am struggling to display a chart.

Can someone please help me out here?

Thanks,

Dinesh

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Well, I think you should be fine with what you have now (see my last attachment).

You'll need to test if the results are ok, maybe I still do misunderstand your requirements.

Regards,

Stefan

P.S. It's a good habit to mark answers as helpful or correct and to close the thread by marking answers as correct or  by changing the OP status to 'assumed answered', as soon as you have resolved your issue.

Not only for this discussion, but for all the discussion you opened. This rewards the effort of the fellow discussion members and helps other to quickly grasp the relevant parts of a discussion.

View solution in original post

8 Replies
swuehl
MVP
MVP

Maybe like attached?

Create two straight table charts, with Title as dimension,

then as expression in first chart

=count({<[Create Date] = {">=$(=today()-90)"}>}[Create Date])

and in second

=if(sum({<[Create Date] = {">=$(=today()-90)"}>} Subscriber)<=50,

sum({<[Create Date] = {">=$(=today()-90)"}>} Subscriber),0)

Not applicable
Author

Thanks swuehl for quick replied.

But the result is not correct. If you take a look the revised data (attached)

Q1: Ans: B,F,J,L,M,O,R,S

swuehl
MVP
MVP

I've read the 'no create date' as number create date, maybe mislead by the need help on count  😉

Try just

=count({<[Create Date] = {"<$(=today()-90)"}>}[Create Date])

swuehl
MVP
MVP

If you could have multiple create date per Title, above expression will get an incorrect result if you have some create dates before and some after the 90 days threshold, but I think this one could handle it:

=count({<Title = e({<[Create Date] = {">=$(=today()-90)"}>}) >} Title)

Not applicable
Author

thanks swuehl,

Shall i apply same logic for other Question that needs to display less than 50 subscribers in the last 90 days?

swuehl
MVP
MVP

The current logic should be fine if I understood your question correctly, here we filter the create dates and we are not interested in events that took place before, right?

Not applicable
Author

Thanks swuehl for all solutions.

i think we need to limit only last 90 days timeframe regardless if any event took place before. So do we need to approch differently?

swuehl
MVP
MVP

Well, I think you should be fine with what you have now (see my last attachment).

You'll need to test if the results are ok, maybe I still do misunderstand your requirements.

Regards,

Stefan

P.S. It's a good habit to mark answers as helpful or correct and to close the thread by marking answers as correct or  by changing the OP status to 'assumed answered', as soon as you have resolved your issue.

Not only for this discussion, but for all the discussion you opened. This rewards the effort of the fellow discussion members and helps other to quickly grasp the relevant parts of a discussion.