AugForums.com

An Acumatica User Group

  • Free
    • Start Here
    • Rolodex
    • Podcast
    • Blog
    • Forums
  • Paid
    • AugSQL
    • GI Course
    • GI Library
    • Consulting
  • Register
Acumatica Forums

By using this website, you agree to our Terms of Use (click here)

Forums
AUG Forums
Acumatica Generic I...
Column to total dat...
 
Notifications
Clear all

Questions Column to total data for same week/date for prior year

 
Acumatica Generic Inquiries & Pivot Tables
Last Post by KBlas 7 years ago
3 Posts
2 Users
1 Reactions
3,922 Views
RSS
KBlas
Posts: 12
 KBlas
Topic starter
September 22, 2018 9:41 am
(@kblas)
Eminent Member
Joined: 6 years ago

Hello! I've searched old posts trying to combine ideas to get this accomplished, but I'm struggling.  I am trying to create a GI that has the start date of an event with total attendance (custom field) and add another column that shows the total attendance for prior year next to current year.  I was hoping to pull same week prior year but I can't seem to get the right formula. So I have tried this formula.  Can anyone help? I've tried several different options that now I've completely confused myself.

This is the latest formula I have tried:

=IIf(Year([CRPMTimeActivity.StartDate])=Year([StartDate]-1) And Month([CRPMTimeActivity.StartDate])=Month([StartDate]-12) And Day([CRPMTimeActivity.StartDate])=Day([StartDate]-365),[CRPMTimeActivity.UsrActualAttendance],0)

 

My parameters are:

StartDate = CRPMTimeActivity.StartDate = @YearStart

EndDate = CRPMTimeActivity.StartDate= @Today

I also attached screenshots.

Thanks in advance for any help. I'm sure it's something small I am missing!

 

giss.docx


2 Replies
Tim Rodman
Posts: 3195
 Tim Rodman
Admin
September 26, 2018 4:38 am
(@timrodman)
Famed Member
Joined: 10 years ago

For the week, what about joining over to the DateInfo Data Access Class (DAC) and grabbing DateInfo.WeekEnding?

For the prior year attendance, are you matching on only one event record? Or might you need to add multiple event records to come up with total attendance for the same week prior year?

Lastly, using DateAdd might make your formula simpler (except I'd replace [CRPMTimeActivity.StartDate] and [StartDate] with their respective DateInfo.WeekEnding values):

=IIf(DateAdd([CRPMTimeActivity.StartDate],'y',-1)=[StartDate],[CRPMTimeActivity.UsrActualAttendance],0)

But this formula wouldn't be able to add together multiple records. Hence the second question above.


Reply
KBlas
Posts: 12
 KBlas
Topic starter
November 11, 2018 11:45 am
(@kblas)
Eminent Member
Joined: 6 years ago

Thanks, Tim.  I didn't even think about DateInfo.  I finally got around to working with the GI again and that works great!  


Reply
Tim Rodman reacted
Forum Jump:
  Previous Topic
Next Topic  
Forum Information
Recent Posts
Unread Posts
Tags
  • 12 Forums
  • 2,526 Topics
  • 10.9 K Posts
  • 7 Online
  • 2,412 Members
Our newest member: kadencewp
Latest Post: Generic inquiry with information from Audit history(CT301000)
Forum Icons: Forum contains no unread posts Forum contains unread posts
Topic Icons: Not Replied Replied Active Hot Sticky Unapproved Solved Private Closed

Online Members

 No online members at the moment

Acumatica Forums

Terms of Use & Disclaimers :: Privacy Policy

Copyright © 2025 · AUG Forums, LLC. All rights reserved. This website is not owned, affiliated with, or endorsed by Acumatica, Inc.

‹›×

    ‹›×