Doug Parkhurst Posted July 13, 2021 Share Posted July 13, 2021 I have a chart where I am showing data for the past 13 months by quarter but I dont want to show data for the current quarter until it is complete (i.e. no partial data). This is a revolving 13 months of data. Link to comment Share on other sites More sharing options...
Martin Yergeau Posted July 13, 2021 Share Posted July 13, 2021 Definition of but I dont want to show data for the current quarter until it is complete may affect the answer to your question. Does a quarter is automatically completed once we move to first day of the fallowing month or is there any internal/business process that tells you that the quarter is now completed Are you using calendar quarter (Q1 = Jan+Feb+Mar, Q2 = Apr+May+Jun, ) or internal/Cie quarter that differ from calendar quarters Which tool/version are you using to build your chart : AS, IA, Designer Link to comment Share on other sites More sharing options...
Doug Parkhurst Posted July 13, 2021 Author Share Posted July 13, 2021 Hi, a quarter is completed when you move to the first day of the following month. I am using snapshot year quarter in the horizontal axis and the chart was made in InfoAssist. Link to comment Share on other sites More sharing options...
Martin Yergeau Posted July 14, 2021 Share Posted July 14, 2021 I am not sure how you are ending up with 13 months when you do display per quarter and only completed quarters. Assuming that you may include 4 quarters it is 12 months and 5 quarters its 15 months of data Now, it may not be the only solution, but here an option. 1- You need to determine current quarter and Year 2- You need to determine the transaction year and quarter from the data source transaction date Then here a sample that you will need to adapt for your file and situation. In this sample that includes future transactions which I assume you dont have. Otherwise you will have to adjust to remove them. DEFINE FILE WF_RETAIL CurYr /YY = &DATEYY; CurQtr /QTR = &YYMD; TrsYr /YY = TIME_DATE; TrsQtr /QTR = TIME_DATE; TrsYrMth /YYMONTH = TIME_DATE; END TABLE FILE WF_RETAIL BY CurYr BY CurQtr BY TrsYr BY TrsQtr BY TrsYrMth WHERE (TrsYr EQ CurYr AND TrsQtr LT CurQtr) OR (TrsYr GE (CurYr - 1) AND TrsYr LE CurYr AND TrsQtr GE CurQtr AND TIME_DATE LT &YYMD); END Link to comment Share on other sites More sharing options...
David Beagan Posted July 15, 2021 Share Posted July 15, 2021 In InfoAssist I see you can create a filter based on Beginning of Quarter. I tried it setting my date to strictly less than Beginning of Quarter. When I ran the report, all of the current quarters dates were removed from the output. image.png869713 25.6 KB This is the code that InfoAssist generated to accomplish this: -DEFAULTH &TODAY_HYYMDS = &DATEHYYMDS.EVAL; . . . WHERE Date_HYYMDS LT DTRUNC('&TODAY_HYYMDS',QUARTER); Link to comment Share on other sites More sharing options...
Doug Parkhurst Posted July 16, 2021 Author Share Posted July 16, 2021 Thanks David, that is the solution that I used. Link to comment Share on other sites More sharing options...
David Beagan Posted July 16, 2021 Share Posted July 16, 2021 You are welcome. Would you mark mine as the solution Thanks Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now