1 Reply Latest reply on Jan 3, 2019 5:58 PM by Esther Aller

Current year ytd and MTD and FY working need help on same for previous year

Hi All,

I have attached workbookv10.5

I have yearly sales breakdown by months

Requirment is I shold have 3 filters 1.year,2.Month and 3.Period(MTD/YTD/FY) -  I am able to achieve this for for Current year look same logic for previous year in year drop down.

----------------------------

its  working fine for current year  YTD and MTD AND FY including all selection.

for  previous Year 2017

if year 2017 and ytd/fy/Mtd = YTD and month  = 2 it should show jan and feb data

if i select only  YTD/FY/MTD = YTD  and month =1  it should show jan 2017 .

if year 2017 and YTD/FY/MTD = MTD  and month = 2 it should show only feb values

thanks

• 1. Re: Current year ytd and MTD and FY working need help on same for previous year

Hi Rao,

This Knowledge Base article Creating Year To Date and Month To Date Calculations explains how to create YTD and MTD calculations. I see that you have already used this logic in some of your calculations; However you have created conflicting conditions. For example:

Instead of using both sets of conditions, you want to replace TODAY() with your parameter. Also I recommend using [Sales] in the view and adding one filter to the filter shelf, rather than creating several sales calculations.

I was not sure how "FY" should filter the view, so in the attached workbook I did an example for YTD and MTD. I only used one filter on the entire view with the following formula:

( [YTD/FY/MTD] = "YTD"

AND DATEPART('month', [Date]) <= IF [Choose Month (copy)] = "All" THEN 12 ELSE INT([Choose Month (copy)]) END

AND DATEPART( "year", [Date]) = [YEAR])

OR

( [YTD/FY/MTD] = "MTD"

AND DATEPART('month', [Date]) = IF [Choose Month (copy)] = "All" THEN 12 ELSE INT([Choose Month (copy)]) END

AND DATEPART( "year", [Date]) = [YEAR])

Hope this helps!