Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
TomBond77
Specialist
Specialist

Rolling 12 month in dimension

Hi experts

I would like to design a button with the following logic:

[Contract Start]={<{"$(='>=' & Monthstart(Addmonths(Max(YearMonth),-11)) & '<=' & MonthEnd(Max(YearMonth)))"}>}

YearMonth is calculated already in the KPIs and will be selected by the user, user selects e.g. 2024-Jan.

The user would like to restrict further the results by clicking on this button. 

But the above formula is incorrect, syntax error, when using it as a dimension in a table.

Any ideas how to resolve this issue?

Thanks, Tom

1 Reply
Chanty4u
MVP
MVP

Try this

[Contract Start] = {'>=' & Date(MonthStart(AddMonths(Max(YearMonth), -11)), 'YYYY-MM-DD') & '<=' & Date(MonthEnd(Max(YearMonth)), 'YYYY-MM-DD')}