Skip 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.

Count one value based on another value...

Featured Replies

Hello.

I do have, in my db, a single table.

I have the fields:

"ID"

"Productnumber"

"Location"

"In_Stock"

"Total_Locations"

My question is;

I have several productnumbers, both with and without letters/ numbers, but they are not unique.

Each Productnumber is given a location.

Each location is not unique to that productnumber.

But, I might have the same productnumber several times, but with different locations.

I need the field "Total_Locations" to count the number of unique locations, for each Productnumber.

I.E. I have:

PO# "920-580" on both Location "H1" and "291504".

The "Total_Locations" would be 2.

PO# "MayOS" is located only on Location "VM2".

The "Total_Locations" would be 1.

You get my drift? :o

Regards

Christian

Assuming the PO# is in the "Productnumber" field and the ID is a unique not empty field, you could create a self relationship based on "Productnumber"

Then, make the field "Total_Locations" a calculation such as Total_Location = count(Location_self::ID)

Edited by Guest
self is reserved

  • Author

Perfect!

Thank you.

Christian

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

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.