Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have NumMonth field in my master calendar, and I am using the following code to generate NumMonth.
num(Month(TempDate)) As NumMonth
Now I want to get previous months count m based on my month selection. I am using this code.
=count({$< NumMonth={"=num(max(NumMonth))-1"}>} Reconciliation_ID)
This code is giving me current months count. if I hard code the value as
=count({$< NumMonth={5}>} Reconciliation_ID) I get the result . however it is not working with the code I am using.
Please help
Thank you,
Ashis
Hello,
please add this field to your model : Year(Date) * 12 + Month(Date) as [Month Counter].
And then your set analysis becomes [Mounth Counter] = {'$(=MAX([Month Counter] - 1))'}.
Il you use Num Month, you will have an issue in January. The solution I propose goes to December of the previous year.
Thanks,
Brice
You can use this?
=count({$< NumMonth={'$(=Max(NumMonth)-1)'}>} Reconciliation_ID)
Thank your for your reply,
It is giving me 0 as value.
Hi,
If you put the formula (=num(max(NumMonth))-1) in a label, what's the result? is 5?
Regards
I am printing it in a text box
so if I put your code it is giving me 7 (numeric value ) if the month Aug(8) is selected.
Hi
Please try this
=count({$< NumMonth={'$1(=Max(NumMonth)-1)'}>} Reconciliation_ID)
Regards
Tahemas Momin
I would think this to work from Anil
=Count({$<NumMonth={'$(=Max(NumMonth)-1)'}>} Reconciliation_ID)
With a slight issue that what would you want to see when Jan is selected?
Thanks for your reply . No it did not work.
To get the previous month of current selection
=num(max({$}MonthNum))-1
to get the previous Selection
=num(max({$1}MonthNum))-1
Regards
Tahemas Momin
Hello,
please add this field to your model : Year(Date) * 12 + Month(Date) as [Month Counter].
And then your set analysis becomes [Mounth Counter] = {'$(=MAX([Month Counter] - 1))'}.
Il you use Num Month, you will have an issue in January. The solution I propose goes to December of the previous year.
Thanks,
Brice