YTD Calculation on Measure object


Can you please help me with the formula on calculating YTD with measure object in WebI Report? Backend is HANA DB


Try creating a YTD Measure variable with a formula like this…

=[YourMeasure] Where([YourDate] >= ‘01/01/2021’)

You can create a First of Current Year variable if you want with the following formula…

=ToDate(“01/01/” + FormatNumber(Year(CurrentDate());"####"); “MM/dd/yyyy”)

Then your YTD Measure variable formula would look like this…

=[YourMeasure] Where([YourDate] >= [First of Current Year])

Best is to make this calculation in the universe. If not make sure that you include all the the data of this year into you selection