Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
suvechha_b
Creator III
Creator III

Need Help to write the expression.

How can I write the expression :

SUM({<[Forecast Fiscal Month] = {'$(=([Forecast Fiscal Month],-1))'}>}[Stag Forecast Units])

19 Replies
its_anandrjs

Put single cots like

=SUM({<[fis_month] = {'$(=Max([Forecast Fiscal Month])-1)'}>} [Stag Forecast Units])

its_anandrjs

If you use this

SUM({<[fis_month] = {'$(=(Month(Addmonths(Forecast Fiscal Month,-1)))'}>}[Stag Forecast Units])


use date field and what is your dimension


SUM({<[fis_month] = {"$(=(Month(Addmonths(YourDatefieldHere,-1)))"}>}[Stag Forecast Units])



and use double cots


MK_QSL
MVP
MVP

SUM({<[Forecast Fiscal Month] = {"$(=Date(AddMonths(Max([Forecast Fiscal Month]),1),'MMM YYYY'))"}>}[Stag Forecast Units])

suvechha_b
Creator III
Creator III
Author

My Sample Model attached.

suvechha_b
Creator III
Creator III
Author

PFA ...

The sample Model...

suvechha_b
Creator III
Creator III
Author

PFA ...

The sample Model...

suvechha_b
Creator III
Creator III
Author

PFA ...

The sample Model...

Anonymous
Not applicable

I understood that basing on some filters u should calculate sum. I had a similar situation earlier and I solved it using this expression. I think your req is similar to what I had earlier,please change your code in accordance with the one I pasted below. Here newyear,a field, has a filter and newmonth,another field, has 3 filters. work on it.Place the quotes properly. Hope it helps.

sum

({<newyear={'$(=max(newyear)-1)'},newmonth={'$(=Month(AddMonths(max(Dates),3)))','$(=Month(AddMonths(max(Dates),2)))','$(=Month(AddMonths(max(Dates),1)))'}>}Sales)

tresesco
MVP
MVP

What you explain is not what is there in your application; field values are not similar. However, if you can brief about your expected result, might help us help you.

Not applicable

Hi Suvechha,

Try creating one inline table, this will be used in assigning numbers to [Forecast Fiscal Month] field because if you try in text box also max([Forecast Fiscal Month]) it won't come because [Forecast Fiscal Month] is text.

Please let us know if it works.

Thanks

Suhas