Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

FirstSortedValue or Dimensionality??

Hi, I've this table and I wanna use it to contract and pick the value for the max month.

Sem título.png

For example:

When I contract the field "1 Semestre" will show the value 552 of Jun and wont show the sum of this values.

I tried Dimensionality and it doesn't works, because I've a pivot table.

I tried FirstSortedValue and if doesn't works too, because I have a Sum inside the expression.

*Expression = Sum(NrAlunoMesAnt)+Sum(NrAluno)

Could you help me what function I've to use?

Thanks

1 Solution

Accepted Solutions
robert_mika
Master III
Master III

Not sure but did you try secondary dimensionality?

You have got horizontal dimension so that may work

The second dimension... or how to use secondarydimensionality()

View solution in original post

4 Replies
robert_mika
Master III
Master III

Not sure but did you try secondary dimensionality?

You have got horizontal dimension so that may work

The second dimension... or how to use secondarydimensionality()

Anonymous
Not applicable
Author

Robert,

That's the Function that I'm looking for, thanks.

But It doesn't working yet.

Look the expression:

if(SecondaryDimensionality()=2,Sum(NrAlunoMesAnt)+Sum(NrAluno),

Sum({<MesNum={"$(=Max(MesNum))"}>}NrAlunoMesAnt)+Sum({<MesNum={"$(=Max(MesNum"}>}NrAluno))

If I put just if(SecondaryDimensionality()=2,Sum(NrAlunoMesAnt)+Sum(NrAluno)) it works but if I put the Set Analysis doen't works.

Could you help me??

Kushal_Chawda

As Robert said, you need to use secondary dimensionality.

Something like below

if(Secondarydimensionality()=1,

firstsortedvalue(NrAlunoMesAnt, -Month)+ firstsortedvalue(NrAluno, -Month),

Sum(NrAlunoMesAnt)+Sum(NrAluno))

Make sure that your month created using Month fucntion: Month(Month)

Anonymous
Not applicable
Author

It Works noww...thanks a looooot.