
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Last Month End Date
When i run this
let vLastmonthdate =date(floor(monthend(addmonths(Today(),-1))),'DD-MM-YY');
and when i add it in a text box using $(vLastmonthdate ) it displays
12/30/1899. But i want last month end date so it should show as 30-09-2021.
Please help
Accepted Solutions

.png)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Remember that a dollar expansion is expanded BEFORE the expression is parsed. This means that
=$(vLastmonthdate)
will evaluate to
=30-09-21
which, when parsed and calculated is zero. Zero formatted as a date will be 12/30/1899.
Try this instead:
='$(vLastmonthdate)'

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Text box > Data > Add measure
MonthEnd(MonthStart(Now())-1)
Create a variable outside the load editor

.png)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Remember that a dollar expansion is expanded BEFORE the expression is parsed. This means that
=$(vLastmonthdate)
will evaluate to
=30-09-21
which, when parsed and calculated is zero. Zero formatted as a date will be 12/30/1899.
Try this instead:
='$(vLastmonthdate)'
