Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
london1980
Contributor III
Contributor III

Button Object with calculation

Hi All,

I'm trying to create a button object but it's not working.

Action - Select in Field

Field

=Inventory/Weekly_Demand

Search String

<1

Basically I want divide my inventory quantity by weekly demand to see how many weeks of inventory I have and want the button to show the items where my inventory is less than 1 week.

any suggestion will be highly appreciated

thanks

MT

1 Solution

Accepted Solutions
swuehl
MVP
MVP

No, you can only use fields to make selections in. So you need to put a field name (without any leading equal sign, just the field name) under Field in the action dialog. I don't know the name of that field, but since you want to filter items, put the field name corresponding to items there.

Then use

='=Sum(Inventory) / [Weeekly Demand] <1'

as search string. This should work if sum(Inventory) as well as [Weekly Demand] return values per item.

In other words:

You need to be able to create a chart with dimension Item (or whatever your field is called) and an expression

=Sum(Inventory) / [Weeekly Demand]

and this expression should return number of weeks you can work with inventory at hand per Item value.

View solution in original post

4 Replies
swuehl
MVP
MVP

For the field, just use the fieldname, without the leading equal sign:

Inventory/Weekly_Demand

edit: I've missed that this is not a field name.

Try to make a selection in field Item (or whatever this field is named, you can only use field names for a select in field action)

and as expression something like

='=Sum(Inventory) / [Weeekly Demand] <1'

london1980
Contributor III
Contributor III
Author

so in Button > Actions > Select in Field i put this formula    ='=Sum(Inventory) / [Weekly Demand] <1'    under Field and left Search String blank, didn't work. Is that what you meant?

swuehl
MVP
MVP

No, you can only use fields to make selections in. So you need to put a field name (without any leading equal sign, just the field name) under Field in the action dialog. I don't know the name of that field, but since you want to filter items, put the field name corresponding to items there.

Then use

='=Sum(Inventory) / [Weeekly Demand] <1'

as search string. This should work if sum(Inventory) as well as [Weekly Demand] return values per item.

In other words:

You need to be able to create a chart with dimension Item (or whatever your field is called) and an expression

=Sum(Inventory) / [Weeekly Demand]

and this expression should return number of weeks you can work with inventory at hand per Item value.

london1980
Contributor III
Contributor III
Author

Now I got it, many thanks!