Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
souadouert
Contributor III

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

Re: set analysis MONTH-1

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
Contributor III

Re: set analysis MONTH-1

even with total i have 0Smiley Sad

Re: set analysis MONTH-1

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
Contributor III

Re: set analysis MONTH-1

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

souadouert
Contributor III

Re: set analysis MONTH-1

AND WHEN I USED YEAR THE RESULT IS 57 125

Re: set analysis MONTH-1

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
Contributor III

Re: set analysis MONTH-1

i have 10

Re: set analysis MONTH-1

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

Re: set analysis MONTH-1

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

Community Browser