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: 
Anonymous
Not applicable

Set Analysis User Name by Selected Year

Hi All,

I am trying to count  by selected year where the "Created" year equal to YEAR.

Currently using the calculated dimension as below:

=Aggr(Only({$<Year={"$(=Date(Created,'YYYY')"}>} [User Name]), [User Name])

Expression:

Count([AR ID])

But its returning me null.

Can you please advise where I am having the issue.

Please see the attached sample qvw file.

Thanks & Regards,

Farrukh

16 Replies
sunny_talwar

Created is a timestamp field... convert this into  just date before you create your calendar and also create this into date in your tblInfoPath table

Date(Floor(Created)) as Created in both places is needed

Anonymous
Not applicable
Author

Hi Youssef,

Please see the below snapshot:

User_1 has many ARIDs. and AssignTO is a key value which is link to Info table.

Farrukh

YoussefBelloum
Champion
Champion

here it is ok.. but on your table you have:

dimension = user_name

measure: AR_ID

the green data are ok

the red data cannot work

problem2.png

Maybe I'm missing something..

Anonymous
Not applicable
Author

Thanks Sunny,

Now its giving me the correct counts. but its still not showing the dimension:

=Aggr(Only({$<Year={"$(=Year(Created)"}>} [User Name]), [User Name])

And giving me //Error in caluculated dimension.

Farrukh

sunny_talwar

Can you re-attach please

Anonymous
Not applicable
Author

Thanks Sunny, This has been sorted, instead of calculated dimension I use just a normal field as a dimension.

Thanks for all you great help.

Kind regards,

Farrukh