AugForums.com

An Acumatica User Group

  • Free
    • Start Here
    • In-Person Gatherings
    • Power BI Workshop
    • Podcast
    • Rolodex
    • 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 Report De...
Formula to calculat...
 
Notifications
Clear all

Questions Formula to calculate Total line items

 
Acumatica Report Designer
Last Post by Tim Rodman 8 years ago
12 Posts
2 Users
0 Reactions
8,266 Views
RSS
Posts: 58
 sunwayfan
Topic starter
April 19, 2018 4:59 pm
(@sunwayfan)
Member
Joined: 8 years ago

I am building a report which has a field that should display the total line items.

=count([SOShipment.ShipmentNbr])

Is there a way in which we can display count of only unique ShipmentNbr in the column?

Also is there a way where i can omit the 0's and give a count.
=count([SOLine.Qty])

 


11 Replies
Tim Rodman
Posts: 3204
 Tim Rodman
Admin
April 19, 2018 9:39 pm
(@timrodman)
Famed Member
Joined: 11 years ago

Can you explain more about what data is in the report? I'm trying to picture it. Even better, if you could attach the .rpx file...


Reply
 sunwayfan
(@sunwayfan)
Joined: 8 years ago

Member
Posts: 58
April 20, 2018 12:38 pm
Reply toTim RodmanTim Rodman

This is the report for Shipment details by customer

226-SO621000.rpx

The formula =count([SOShipment.ShipmentNbr])   counts all the shipment number for that customer, I want it to count only unique shipment nbr.

And for Total lines ordered/shipped column, i want to write a formula that will not count 0's 


Reply
Tim Rodman
Posts: 3204
 Tim Rodman
Admin
April 20, 2018 10:39 pm
(@timrodman)
Famed Member
Joined: 11 years ago

Ah, I see. What you really need is a DISTINCTCOUNT function like in Power BI, but there isn't such a function currently in Report Designer. You might want to add your vote to this:
https://feedback.acumatica.com/ideas/ACU-I-583

To get around this, you could use a variable, but I'm not sure you could display the result in the groupHeaderSection1 area of your report. I think you would need to put it in the groupFooterSection1 area because that's when the variable would actually have a value.

But I'm not a big fan of variables because they can be slow. I prefer to use a Subreport. You could build a Subreport that only includes Shipments, not Shipment Lines. Then pass the customer as a parameter to the Subreport and have the Subreport return the Shipment count. Even though it's a Sub "report' it's really acting like a Sub "field".


Reply
 sunwayfan
(@sunwayfan)
Joined: 8 years ago

Member
Posts: 58
April 22, 2018 12:46 pm
Reply toTim RodmanTim Rodman

Okay!

Can you give me an example of how to use variable in report designer that would give me the count of lines?


Reply
Posts: 58
 sunwayfan
Topic starter
April 23, 2018 11:10 pm
(@sunwayfan)
Member
Joined: 8 years ago

This is the sub report that I created but it is still showing total line count.

And it is not visible on the Main report too.

Attaching the Main report and Sub Report.

SO6210001.rpx

SO621000.rpx


Reply
 sunwayfan
(@sunwayfan)
Joined: 8 years ago

Member
Posts: 58
April 24, 2018 5:23 pm
Reply tosunwayfan

I created a sub report for the shipments, but if there are 4 shipments for that customer it shows number 4 on 4 lines

4

4

4

4

How can i limit it to only one line?

SO6210001.rpx

How can i create a sub report for Total lines ordered/shipped column, so that will not count the line which has a zero value? 


Reply
Tim Rodman
Posts: 3204
 Tim Rodman
Admin
April 25, 2018 10:05 pm
(@timrodman)
Famed Member
Joined: 11 years ago

You'll need to get the Subreport working first. Then you can drop it in the main report.

To get the SO6210001.rpx Subreport working, you need to group by the CustomerID, then only make the group header visible so you see the total value rather than the detail lines. Like this:

SO6210001.rpx


Reply
 sunwayfan
(@sunwayfan)
Joined: 8 years ago

Member
Posts: 58
May 1, 2018 10:01 am
Reply toTim RodmanTim Rodman

It gives correct result only for current month. 

If I change the Date to last month the Total Shipments in not able to give correct values, though the subreport shows correct values for last month if ran separately. 

Do I have to add any parameters in the main report?


Reply
Tim Rodman
Posts: 3204
 Tim Rodman
Admin
May 4, 2018 5:09 am
(@timrodman)
Famed Member
Joined: 11 years ago

Did you make changes to the reports? If so can you attach the current versions?


Reply
 sunwayfan
(@sunwayfan)
Joined: 8 years ago

Member
Posts: 58
May 4, 2018 12:45 pm
Reply toTim RodmanTim Rodman

SO6210001.rpx

SO621000.rpx


Reply
Tim Rodman
Posts: 3204
 Tim Rodman
Admin
May 11, 2018 12:39 am
(@timrodman)
Famed Member
Joined: 11 years ago

In the Parameters field on the Subreport in the Main report, you are passing =[SOShipment.CustomerID] like this:

Try changing =[SOShipment.CustomerID] to =[Customer.BAccountID]


Reply
Forum Jump:
  Previous Topic
Next Topic  

Currently viewing this topic 1 guest.

Forum Information
Recent Posts
Unread Posts
Tags
  • 12 Forums
  • 2,532 Topics
  • 11 K Posts
  • 32 Online
  • 2,418 Members
Our newest member: Chad Treadwell
Latest Post: Limited or no support from Acumatica?
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 © 2026 · AUG Forums, LLC. All rights reserved. This website is not owned, affiliated with, or endorsed by Acumatica, Inc.

‹›×

    ‹›×