I have to create a report for monthly and YTD calculation in BO which will have product,month and year report filters on top of it.
For YTD calculation if user have selected Month=“FEB” then it should give min of jan+min of Feb,but i think because of report filter applied for month =“FEB”. the formula for YTD is :-
If you want a year to date figure, you may be better building a case statement at the universe level.
At the report level, if you’ve filtered for Month = Feb, you’ll only get Feb data
If you filter for Month <= Feb, you’ll get Jan and Feb, unless your months are strings, in which case you’ll just get Feb because J comes after F alphabetically.
SUM
( CASE WHEN sales_calendar.sales_date BETWEEN @Select(Relative Dates\Start of Current Year) AND @Select(Relative Dates\Yesterday)
THEN sales_fact.sales_value
END
)
This assumes that:
[list]You have a calendar table in your database and have created an alias of it called sales_calendar which is joined to your sales_fact table and,
You have set up a relative dates class in your universe, as per this thread[/list]