I have the code below which calculates the current year rolling sales and lasy year rolling sales. i'm not able to do the same for ytd calculation in the same code. i have filter of view with option of (rolling and ytd). if select rolling from the filter i can sales in text object with current year rolling sales and last year rolling sales. I want the same to be calculated for YTD.
Attaching you the QVW file and aslo the code for rolling calculation.
Thank you for your extended support, i had a review meeting today for the dashboard. they dont want period as a filter in the dashoard. there should be only filter of view consisting rolling and ytd. Now suppose i select rolling from view filtre then in the text object of revenue. i should get rolling current year revene and rolling last year revenue and if i select YTD from view filter then in the revenue text object it should be current year YTD revenue and last year YTD revenue. To the question you asked i think the logic doesnt fit. This is the requriment, can you help me on this please.