Announcements
cancel
Showing results for
Did you mean:
Not applicable

Multiple Store Stock Value

I am trying to create a simple Gauge Chart which displays an overall value of stock held accross multiple stores (and individual stores when selected), but i am failing miserably.

The stores are displayed in a basic table box which displays the stock currently available, and the total value of each stock item. The stock value field was created in the script using the below:

[StockOnHand]*[IssuePrice] AS "StockValue"

For the gauge chart i am simply using the expression below

Sum ((StockItemsStockHoldings.StockOnHand)*(StockItemsStockHoldings.IssuePrice))

I could also use

Sum (StockItemsStockHoldings.StockValue)

as it has the same result

Whilst this works when looking at individual stores, when more than one store is selected in the table box, to look at the overall value of stock held, the figure is completely wrong, and I am unable to figure out why.

If any one has any ideas as to what is causing this error, I would appreciated your assistance

Cheers

3 Replies
Master II

Well, typically a gauge chart needs a denominator so it can be expressed as a fraction of the whole...try dividing your expression by sum(total StockValue). If that doesn't give you the view you're looking for, you may want to try a different type of chart, like a bar chart.

Regards,

Not applicable
Author

unfortunately dividing the expression by the total stock value didnt work.

However, by switching to a bar chart, i was able to see that instead of there being 3 seperate stores data, there was a 4th that was not assigned to a store. I am unsure as to where this data is coming from, so do not want to use it. when using a bar chart, i can use the store name as a dimenson, ignore nulls, and the 'ghost data' is not included. I am unsure how to do this for a gauge chart

cheers

Master II

You can't really do this in a gauge chart because it doesn't have dimensions. You can do something similar though: sum(if(len(trim(Store))>0,StockValue). But, again, I doubt that a gauge chart would give you what you're looking for. If this is really what you want, check to make sure the gauge minimum and maximum represents a correct scale in the Presentation tab.

Regards,

Community Browser