Dashboard Discussion, Support, Examples, Help » How-To

Inventory balance trend in ms SQL

(2 posts)
  1. Happy Holidays...
    I have downloaded InfoCaptor, and it is exactly what I am looking for! thank you!
    quick question....
    I plan on using it to access MS SQL databases.

    How do you track items that do not have datebase fields.
    For example, I have a SQL query that looks at our inventory balance when the SQL statement is run. How would I track the results on let's say a weekly basis with a chart? TheSQL statement result is point in time. Where are the results stored so that I can monitor a trend?

    Posted 1 year ago #
  2. email reply--

    Thank you and happy holidays

    As I understand, you have a SQL query that returns the current inventory balance from the database.

    Does your table have any kind of date column? For e.g If you are sql query is like
    select sum(inventory_balance)
    from inventory_transactions

    then is there any other time related column in the inventory_transactions table? If there is then you could apply database functions to get the week part from the date for e.g

    select format(trx_date,'MMM') as period, sum(inventory_balance)
    from inventory_transactions
    group by format(trx_date,'MMM')

    You could then put this query in the chart editor and select a bar chart type.

    If you don't have any time related columns in your table then you would need some mechanism to capture that information or store the weekly snapshot in a seperate table and use that table for your chart.

    Posted 1 year ago #

RSS feed for this topic

Reply

You must log in to post.