Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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 |
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)