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: 
souadouert
Specialist
Specialist

set analysis MONTH-1

whe i used this expressioin

Sum( {<COMPTE_ENCOURS_TND={">0"} ,DATE_SITUATION= {"=MONTH(DATE_SITUATION) = '11'"}, COMPTE_TYPE_DEPOT={"DAV"},CLIENT_PRE_SOUS_SEGMENT_A,CLIENT_PRE_SEGMENT_A,CLIENT_PRE_SEGMENT_A={"HAUT DE GAMME"}>} COMPTE_ENCOURS_TND)

i have the correct resultat , and when i want make this expression dynamic
Sum( {<COMPTE_ENCOURS_TND={">0"} ,DATE_SITUATION= {"=MONTH(DATE_SITUATION) = $(=MAX(MONTH(DATE_SITUATION))-1) "}, COMPTE_TYPE_DEPOT={"DAV"},CLIENT_PRE_SOUS_SEGMENT_A,CLIENT_PRE_SEGMENT_A,CLIENT_PRE_SEGMENT_A={"HAUT DE GAMME"}>} COMPTE_ENCOURS_TND)

i have 0 as result

13 Replies
sunny_talwar

Did you not try the Max(TOTAL...) suggestion yet souad‌? I would really encourage you to try this

Sum({<COMPTE_ENCOURS_TND={">0"}, DATE_SITUATION= {"=MONTH(DATE_SITUATION) = (MAX(TOTAL MONTH(DATE_SITUATION))-1)"}, COMPTE_TYPE_DEPOT={"DAV"}, CLIENT_PRE_SOUS_SEGMENT_A, CLIENT_PRE_SEGMENT_A = {"HAUT DE GAMME"}>} COMPTE_ENCOURS_TND)

souadouert
Specialist
Specialist
Author

even with total i have 0:(

sunny_talwar

Can you check what do you get when you use this in a text box or KPI object

=MAX(TOTAL MONTH(DATE_SITUATION))-1

souadouert
Specialist
Specialist
Author

i have 10 as resultat is not true the max date i have 08/12/2017

souadouert
Specialist
Specialist
Author

AND WHEN I USED YEAR THE RESULT IS 57 125

sunny_talwar

Have you made any selections which might be causing this? Do you wish to ignore selections? May be try this

=MAX({1}TOTAL MONTH(DATE_SITUATION))-1

souadouert
Specialist
Specialist
Author

i have 10

sunny_talwar

Year is 57125? Are you sure your date is read as date by QlikView/Qlik Sense? It almost seems like Dates are not understood as date for some reason

sunny_talwar

Screenshot of DATE_SITUATION in a list box or filter pane object?