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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
LL-HvD
Contributor
Contributor

Age calculation within set analysis, not able to do it in the load

Hello community,

 

I am developing a Qlik Sense app wherein the user selects their own parameters from a date picker, and so I need to calculate their age based on the selected date. I have DOB as a field, and the selected date parameter is called DateBegin. Currently, to calculate the number of members at the  selected date, I have:

 

Count({<StartDate={"<=$(DateBegin)"},CanxDate={">$(DateBegin)"},Relation={'Primary Member'},ClaimDate=>} distinct MemberNo)

 

I need within there to somehow add 'Age(DateBegin,DOB)>=65', but I can't work it out from any previously answered questions. Please help!

Labels (1)
1 Solution

Accepted Solutions
stevejoyce
Specialist II
Specialist II

Count({<MemberNo = {"=Age(DateBegin,DOB)>=65"},  StartDate={"<=$(DateBegin)"},CanxDate={">$(DateBegin)"},Relation={'Primary Member'},ClaimDate=>} distinct MemberNo)

View solution in original post

2 Replies
stevejoyce
Specialist II
Specialist II

Count({<MemberNo = {"=Age(DateBegin,DOB)>=65"},  StartDate={"<=$(DateBegin)"},CanxDate={">$(DateBegin)"},Relation={'Primary Member'},ClaimDate=>} distinct MemberNo)

LL-HvD
Contributor
Contributor
Author

Thanks Steve. It's not giving me the number I'm expecting, but I don't think that's necessarily a problem for you to solve. I could only get '0' or '-' before, so it's moved me a long way in the right direction!