Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am trying to calculate the number of TEU's for the previous period. So if i select the month of March I want to see the number of TEU's for February. I created two variables min_date which gives me the first day of my selected range, and date_diff which gives me the number of days in my range, so if I select the month of March my min_date would be 01/03/2024 and my date_diff would be 31. I tried using the following expression to calculate my previous period: =({<[DATE.autoCalendar.Date]={">=$(=$(min_date) -$(date_diff)-1)))<=$(=$(min_date)-1))"}>} [TEU])
However I am getting the number of TEU's for the month of March and not for February.
Hello, you can use this :
{<month={"$(=month(AddMonths(max(Date),-1)))"}>}
You can use MonthName instead of Month depending on what you want
Hello,
That returns an error in expression.
The formula I provided to you is just the set analysis, you must adapt it to your measure. Additionally, you need to change the field names to match your data