Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Max Period

Hello, someone can help me, I am applying the following formula  Concat(distinct {<Periodo={"=MonthName(Max(Periodo))"}>} Periodo,',')   and I want only the maximum period, but the formula ignores the Max, I do not want the value of all the data but only those that are visualized in the table, since it could show an amount For years, quarter and months on a pivot table, thank you very much



MaxPeriodo.png

8 Replies
rubenmarin

Hi Jonathan, maybe with:

Concat(distinct {<Periodo={"$(=MonthName(Max(Periodo)))"}>} Periodo)


Why not only?:

MonthName(Max(Periodo))

Digvijay_Singh

You would need $ sign inside the element list -

Concat(distinct {<Periodo={"=$(=MonthName(Max(Periodo)))"}>} Periodo,',')

Anonymous
Not applicable
Author

Thanks Ruben but it did not work, my main objective is to achieve something of this style count({<Periodo={"=$(=MonthName(Max(Periodo)))"}>} Periodo), because if I put in the analysis set '$ (= Max (Period))' it will bring me the highest value of all data

Anonymous
Not applicable
Author

Thanks Digvijay but it did not work

Digvijay_Singh

Ensure that Periodo is a dual field generated out of date. If it is a text field then comparison might not work.

Anonymous
Not applicable
Author

I created the Period field in the load script, however when placing the formula I get no value


My Code


Log:

LOAD

    AutoNumber(Id_Recurso) as Id_Recurso,

    MonthName(Log_Periodo) as Periodo,

    Num(Log_Periodo) as #Periodo,

    Year(Log_Periodo) as Año,

    Month(Log_Periodo) as Mes,

    Ceil(Num(Month(Log_Periodo))/3) as Quarter

FROM [lib://Acumulado/Log_Acumulado.qvd]

(qvd);

example.png

Digvijay_Singh

I tried on sample , and this expression worked for me.

=concat(distinct {<Periodo={'$(=Monthname(Max(Periodo)))'}>}Periodo,',')

Anonymous
Not applicable
Author

Yes, but it only brings the last period of the highest year, the rest of the years does not show the corresponding, you could look at my qvf please, what I try is for a year to see the last month, for a quarter to see the last month of this And finally see month by month, thanks for your time