Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Chinnu3
Contributor III
Contributor III

Visualization or In Script. need a logic

Hi All

Id created month
1 1/2/2022 Jan-2022
2 1/3/2022 Jan-2022
3 1/4/2022 Jan-2022
4 1/5/2022 Jan-2022
5 2/15/2022 Feb-2022
6 2/18/2022 Feb-2022
7 3/25/2022 Mar-2022
8 4/14/2022 Apr-2022
9 4/16/2022 Apr-2022
10 4/28/2022 Apr-2022
11 5/15/2022 May-2022
12 5/16/2022 May-2022
13 5/17/2022 May-2022
14 5/18/2022 May-2022

I want to see the Count(ID) data as if i select Month filter of May-2022, I want the count of 14

and If i Select the Apr-2022 i want to see the Up to April data like Count(ID) = 10,

and if i select Mar-2022 i want to see the up to March count as 7

"Month field should be derived from based on "created" column".

If u need more clarification please revert me here.

 

Thanks in advance.

Labels (5)
4 Replies
vinieme12
Champion III
Champion III

Refer this article 

 

https://qlikviewcookbook.com/2015/05/better-calendar-scripts/

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
settu_periasamy
Master III
Master III

Hi,

I believe you want the Max(Id) ? . Create a table with Month as a dimension and Max(Id) as expression..

MonthName(Created)     Max(Id)

Chinnu3
Contributor III
Contributor III
Author

I want only if you select a month for example April, Up to April whatever what ever approved those I want.

If i select March then i need count (ID) up to March(From starting(Jan) to March).

MayilVahanan

Hi 

Try like below


Load *, MonthName(created) as Monthyear Inline
[
Id created
1 1/2/2022
2 1/3/2022
3 1/4/2022
4 1/5/2022
5 2/15/2022
6 2/18/2022
7 3/25/2022
8 4/14/2022
9 4/16/2022
10 4/28/2022
11 5/15/2022
12 5/16/2022
13 5/17/2022
14 5/18/2022
](delimiter is ' ');

Count({<created={">=$(=Date(Min({<month=, Monthyear=>}created)))<=$(=Date(Max(created)))"}, month=, Monthyear=>}Id)

MayilVahanan_0-1653637470279.png

 

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.