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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
smilingjohn
Specialist
Specialist

expression

HI All,

Expertise please havea look .

i want to get from today to back 2 years ..

is this correct expression ..

count({<[Dept T]={'A'},PaidDate={"$(=Max(PaidDate))"}>} ID),

Count({<[Dept T]={'A'},PaidDate={"$(=Max(PaidDate)-1)"}>} ID)/12,

Count({<[Dept T]={'A'},PaidDate={"$(=Max(PaidDate)-2)"}>}ID)/12)

if this is wrong then please correct ..

and the output should be like the way shown in screenshot period.PNG

Thanks in advace

1 Solution

Accepted Solutions
Anil_Babu_Samineni

You can try with. First try in text object using 2 diff expressions and then have a look in report

count({<[Dept T]={'A'},PaidDate={">=$(=AddYears(Max(LoadDate),-2)) <= $(=Max(LoadDate))"}>} ID)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful

View solution in original post

2 Replies
Anil_Babu_Samineni

You can try with. First try in text object using 2 diff expressions and then have a look in report

count({<[Dept T]={'A'},PaidDate={">=$(=AddYears(Max(LoadDate),-2)) <= $(=Max(LoadDate))"}>} ID)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
vikasdesai
Partner - Contributor III
Partner - Contributor III

Hello

Use following Expression

count({<[Dept T]={'A'},PaidDate={">=$(=Yearstart(Max(LoadDate),-2)) <= $(=Max(LoadDate))"}>} ID)