Forum Discussion
MBPCCX
4 years agoAdvocate I
Dynamic Current Quarter Filter
Hi all, I have a scenario where I want to apply a dynamic page filter to include only sales data in the current quarter. For example, today being 14 October 2021, I only want to see sales in this...
- 4 years ago
My apologies, I needed to shift the moths a bit. Give this a try:
Current Qtr = VAR _StartOfQtr = DATE ( YEAR ( TODAY() ), FLOOR ( MONTH ( TODAY() ) -1 , 3 ) + 1 , 1 ) VAR _EndOfQtr = EOMONTH ( _StartOfQtr, 2 ) RETURN [Date] >= _StartOfQtr && [Date] <= _EndOfQtr
jdbuchanan71
4 years agoSuper User
That would look somehting like this.
Current Qtr =
VAR _StartOfQtr = DATE ( YEAR ( TODAY() ), FLOOR ( MONTH ( TODAY() ) -1 , 3 ) + 1 , 1 )
VAR _StartOfPQtr = EOMONTH ( _StartOfQtr, -4 ) +1
VAR _EndOfQtr = EOMONTH ( _StartOfQtr, 2 )
RETURN
[Date] >= _StartOfPQtr && [Date] <= _EndOfQtrAnonymous
3 years agoNot applicable
Hi ,
Even I have the same requirement. But as per my requirement ,I need to calculate " current quarter + Next quarter " sale.
Can you please help me with the formula?
Thnaks in advance
- jdbuchanan713 years agoSuper User
Anonymous
For that we would just need this.
Current Qtr = VAR _StartOfQtr = DATE ( YEAR ( TODAY() ), FLOOR ( MONTH ( TODAY() ) -1 , 3 ) + 1 , 1 ) VAR _EndOfNextQtr = EOMONTH ( _StartOfQtr, 5 ) RETURN [Date] >= _StartOfQtr && [Date] <= _EndOfNextQtr- adude3 years agoFrequent Visitor
Hi, can I have the formula but for just previous quarter only please? I would really appreciate it.
- jdbuchanan713 years agoSuper User
That would be something like this.
Last Qtr = VAR _StartOfQtr = DATE ( YEAR ( TODAY() ), FLOOR ( MONTH ( TODAY() ) -1 , 3 ) + 1 , 1 ) VAR _StartOfLastQtr = EOMONTH ( _StartOfQtr, -4 ) + 1 VAR _EndOfLastQtr = EOMONTH ( _StartOfLastQtr, 2 ) RETURN [Date] >= _StartOfLastQtr && [Date] <= _EndOfLastQtr