Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Dynamic Calculations

Hi all ,

     I am New . I have some set of data. following is attached the Excel file of it..

it contains three rows,

like

     FirstName                    LastName          Created_Date

"firstName195224"     ;"lastName195224"     ;"05/27/2014"

"firstName195224"     ;"lastName195224"     ;"05/23/2014"

"firstName199438"     ;"lastName199438"     ;"08/02/2014"

"firstName668829"     ;"lastName668829"     ;"07/13/2014"

"firstName668829"     ;"lastName668829"     ;"07/13/2014"

"firstName668829"     ;"lastName668829"     ;"07/13/2014"

"firstName668829"     ;"lastName668829"     ;"07/13/2014"

"firstName668829"     ;"lastName668829"     ;"07/13/2014"

what i want is to find the Max created date of each user and the count of users in that date.

Excepted result

Last Created_Date     TotalCount               FirstName

15/4/2014                         5                         firstName195224

                                                                      firstName199438

                                                                      firstName668829

                                                                      firstName668830

                                                                      firstName668432

18/5/2014                         1                         firstName666543

22/5/2014                         3                         firstName123456

                                                                      firstName654322

                                                                      firstName766554

All the sample output shown above is random, it is not relevant to above sample data.

Need to create a tree map showing the Latest_interaction Date and the count of Users following in that Date

Please give me some solution for this problem..

Thanks in advance..

8 Replies
jagan
Luminary Alumni
Luminary Alumni

Hi,

Try like this

Data:

LOAD

FirstName,

LastName,

Created_Date

FROM ExcelFile;

MaxDateByUser:

LOAD

FirstName,

Max(Created_Date) AS Created_Date,

1 AS MaxDateFlag

RESIDENT Data

Group By FirstName;


Now in front end


Diemsnion:

Created_Date, FirstName

Expression:

Count({<MaxDateFlag ={1}>}FirstName)


Hope this helps you.


Regards,

Jagan.



Gysbert_Wassenaar

See attached qvw


talk is cheap, supply exceeds demand
Not applicable
Author

Hi Sir,

Thank u for ur reply...

is it possible to calculate the Max date in the Table calculations instead of Script Level.?

Not applicable
Author

Hi Sir,

Thank u for ur reply...

is it possible to calculate the Max date in the Table calculations instead of Script Level.?

Gysbert_Wassenaar

Yes, use a calculated dimension =date(aggr(max(Create_Date),firstName,LastName)). Using a calculated dimension can cause performance problems since the calculations are done in the UI instead of in the script.


talk is cheap, supply exceeds demand
Not applicable
Author

Hi i am not getting the data as i am getting with the Script..

Can you put an attachment for it?

jagan
Luminary Alumni
Luminary Alumni

Hi Ravi,

Hope you are doing great!  Are you working now in Qlikview? 

Please find attached file for solution.

Regards,

Jagan.

SunilChauhan
Champion II
Champion II

see the attched file

Sunil Chauhan