Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Grand summary question

Featured Replies

Hi all,

I'm summarizing line items of sales records. Items are charged in more than one currency, so I'm sorting/breaking the report by currency. I don't use a body part, only summaries, so that, for example, 85 sales of product xyz are shown on a single line per currency. The next line might show 34 sales of the same item in another currency. This works fine so far.

In the trailing grand summary, I'd like to show the total like so:

Total sales, US$: 2346.50

Total sales, EUR: 3562.52

This doesn't work the way my parts are set up, since I can only have the number field calculated once and FM just adds up all the numbers regardless of the currency. Can this still be done somehow?

Thanks in advance,

Stefan

I don't understand your question. What do the totals represent?

If I am guessing (!) correctly, your report is broken first by product, then by currency? If so, I would suggest you produce the grand totals as text in a global field, using the FastSummaries method.

Alternatively, if you have a fixed list of currencies, you could use a repeating calculation field to split the amounts by currency, and a summary field to total the repetitions individually.

 

Edited by comment

  • Author

The totals should represent the total sales, but broken down by currency. This is what I had envisioned in the report:

[Summary (by currency and product)]

product    qty    currency   price     total

ABC        3        USD         5            15 <- these are already summarized by product ID from several line items

YDH       1       USD          10           10

ABC       2        EUR          8            16

[Trailing grand summary]

Total USD: 25

Total EUR: 16

Instead, the trailing grand summary currently shows:

Total: 41

I will find out about FastSummaries, don't know what that is. The calculation field method would probably work, too. How about a calculation field that would summarize all line items with the same currency based on a relationship. I think that would require one field per currency. Not as straight forward as a summary field. I don't expect more than 3 currencies.

Thanks,

Stefan
 

Edited by stefangs

2 hours ago, stefangs said:

How about a calculation field that would summarize all line items with the same currency based on a relationship.

I don't think that's a good idea. Your report should work with whatever happens to be the found set. Relationships ignore found sets. If you wanted to omit certain products from your report, the totals fetched via a relationship would be incorrect.

Here's a demo showing the repeating calculation field method. Note that this will always show the totals for all currencies in the value list.

 

SplitAmountsR.fp7

Edited by comment

  • Author

Thanks so much for the template you sent me. It will take me a bit to absorb it, but I'm sure it will do. My idea above didn't sound that appealing to me, either!


Stefan

 

  • Author

Comment, your template works perfectly. I must admit, however, that I just sort of copied the code. Can you tell me why you are referencing the file name in the cLabelsR field? It looks like the purpose of this field is to figure out how many currencies are used.

Thanks much,

Stefan

2 hours ago, stefangs said:

It looks like the purpose of this field is to figure out how many currencies are used.

The purpose of the field is to take the "Currencies" value list and put each value into its own repetition.

 

2 hours ago, stefangs said:

Can you tell me why you are referencing the file name

Because that's one of the parameters of the ValueListItems() function.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.