EndOfMonthDate (1/31/2023, 2/28/2023, etc in a date format)
Various String Filters to categorize transactions
Transaction_Count (it’s the number of transactions in that month).
I’m trying to come up with a Calculated Field that does the following, in the following conditions:
It sums up the Calculation between 1/1/2023 and the value of EndOfMonthDt for that row, filtered appropriately across all of the strings that categorize transactions
AND it also will continue to be accurate even if I filter out earlier rows in the month.
So I think that this satisfies part 1: periodToDateSumOverTime(sum({COUNT_APP}),ENDOFMONTHDT,YEAR)
However, I really only want to show the most current EndOfMonthDt in the dataset, and whenever I do that, the calculation “loses” the previous dates, i.e. if I Filter out 1/31/2023, year to date will only calculate Feb and March together. I understand why it does that, but I want it to not do that.
I am thinking maybe the PeriodToDAteSum MIGHT work but the examples aren’t very clear, so I’m having difficulty figuring out the difference between the over time and not over time functions.
Create parameter ( $Uptodate), select fixed date & make it dynamic
Create Calculated field YTD
YTD = ifelse(dateDiff({order_date},${AsOfDate},“YYYY”) = 0 AND {order_date}<=${AsOfDate}, sales, 0)
3) Drag YTD to Row pill
4) Select any date from parameter ( We will get YTD data as per the selected date)
So, if I am understanding right, your solution would have a control where you set a value for UpToDate with a control, and then it would just always calculate to the date you select.
Unfortunately that won’t meet my need.
I guess what I really want is for PeriodToDateSumOverTime to have a level aware option so I can pick pre-filter.
Hello @TRube The sample YTD calculation for this requirement would be something like below. You could start with this and play with filters and iterate on the solution. Please let us know if this has resolved your question.