Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello guys. I need help again.
I have the down table with the date fields and last month's variable (vMesRef).
vMesRef => PerID = {$(=Max(PerID))}
I need a variable that brings me the "MêsAno" before the selected one. I tried the variable "vMesRefAnt", but it does not work.
vMesRefAnt => PerID = {$(=Max(PerID)-1)}
Can someone help me?


None of the options solved.. =/
I can not because I can not disclose the uploaded data.
Try changing this in the variable
vMesRef => PerID = {"$(=Max(PerID))"}
vMesRefAnt => PerID = {"$(=Max(PerID)-1)"}
and
expression
The first object (with the number 52) is the expression =Count ({<vMesRef>} Natureza_Jurídica)
The second object is the expression =Count ({<vMesRefAnt>} Natureza_Jurídica)
please note : I have removed $() as variable is going to replace the modifier.
regards
Pradosh
Count(<{PerID= {$(=Max(PerID))}>} Natureza_Jurídica)
vMesRefAnt => PerID = {"=$(num(Max(PerID),'0')-1)}
I tested all the options given and none serves.
Could you please create two text boxes with the following and paste the results?
Textbox1:
=Max(PerID)
Textbox2:
=Max(PerID)-1

Hi Carolinne,
I have been trying to play around with your issue, and your code works for me on a made-up set of data.
I wonder if it has something to do with the way the PerId variable is represented. Why don't you try this.
In the data load, wherever you are loading this table, use a preceding load line like this:
Num(Month(data)) as PerId_DateNum
The PerId_DateNum field should *look* the same on the table, but perhaps it's represented in a better way beneath the surface.
Then use the same variables with the new fields:
vMesRef => PerID_DateNum = {$(=Max(PerID_DateNum))}
vMesRefAnt => PerID_DateNum = {$(=Max(PerID_DateNum)-1)}
To me it looks like then there shouldn't be anything wrong with your variable and set expression. The problem might be somewhere else
Can you please post what is the exact code behind the text box you have mentioned above in the post? Please copy and paste the whole code (I think what you pasted before was just a part of it)
