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

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

can we ignore a field selection in AVG or age expression

Hi All,

I want to ignore the selections made in the sheet in the below expression. How to change my expression.

avg(Age(AddMonths(Today(),-2), DW_MEM_MONTH_XTRA.DW_MEM.DW_MEM_BIRTH_DATE ) )

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

i got it avg({<DW_MEM_MONTH_XTRA.DW_MEM_MONTH_TEMP.MEM_MONTH=>}  Age(AddMonths(Today(),-2), DW_MEM_MONTH_XTRA.DW_MEM.DW_MEM_BIRTH_DATE )

thank you for your response.

View solution in original post

4 Replies
sunny_talwar

Avg I am sure we can ignore selection by using set analysis, not so much sure about Age. But Vinay something is not right about the expression? Did you forget to add an aggregate function may be?

Anonymous
Not applicable
Author

for finding the age i dont think we need aggr. And average is calculating fine. Please give me some more idea and let me know if i am missing anything.

sunny_talwar

My bad, the last part is the date of birth.

May be this:

Avg({1} Age(AddMonths(Today(),-2), DW_MEM_MONTH_XTRA.DW_MEM.DW_MEM_BIRTH_DATE ))


Avg({1} Age(AddMonths(Today(),-2), Only({1} DW_MEM_MONTH_XTRA.DW_MEM.DW_MEM_BIRTH_DATE)))

Anonymous
Not applicable
Author

i got it avg({<DW_MEM_MONTH_XTRA.DW_MEM_MONTH_TEMP.MEM_MONTH=>}  Age(AddMonths(Today(),-2), DW_MEM_MONTH_XTRA.DW_MEM.DW_MEM_BIRTH_DATE )

thank you for your response.