Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
RichardLee
Creator
Creator

Dynamic Date Range

I would like to create a view that would have a Current Month column but when a filter is selected change to that month.

And 12 columns to follow the selected Date.

 

Account Group Current Month Actual Current Month Budget Current Month '+/- YTD Actual YTD Budget YTD +/- Actual
- 0 0 0 0 0 0 0
1 0 0 0 0 0 0 2414929.21
2 0 0 0 0 0 0 34776
Labels (5)
1 Reply
ogster1974
Partner - Master II
Partner - Master II

Assuming you have a standard date and master calendar

Let vMaxDate=Max([Date]); // Get latest selected date

Let vCurrentMonth=Month(Max($(vMaxDate))); // Get current month selected date

Let vCurrentYear=Year(Max($(vMaxDate))); // Get current year based on selected date

// Current Month

sum({<[Year]={"=$(vCurrentYear)"}, [Month]={"=$(vCurrentMonth)"}>} Actual)

sum({<[Year]={"=$(vCurrentYear)"}, [Month]={"=$(vCurrentMonth)"}>} Budget)

//YTD

sum({<[Year]={"=$(vCurrentYear)"}>} Actual)

sum({<[Year]={"=$(vCurrentYear)"}>} Budget)