visualdatatools.com Forum Index visualdatatools.com
Discussion for DataTank and DataGraph
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Negative weight in histogram doesn't work

 
Post new topic   Reply to topic    visualdatatools.com Forum Index -> Bug Report
View previous topic :: View next topic  
Author Message
74rk



Joined: 12 Apr 2018
Posts: 11
Location: Tilburg, The Netherlands

PostPosted: Tue Oct 23, 2018 5:58 am    Post subject: Negative weight in histogram doesn't work Reply with quote

I've a table of data where each line represents either 'in' or 'out' data. I want to calculate a running sum. Using a histogram I count the number of time stamps. A map-column converts in to 1 and out to -1. This column is selected as the weight. I expect the outcome to be the running total, the number of items that are 'in'.

I realise this may yield negative bars, which may sound odd, but is not forbidden as far as I know.
_________________
René Knuvers
Sr. Engineer - LUCROS Railway Engineering
Back to top
View user's profile Send private message Visit poster's website
Pamela



Joined: 25 Feb 2017
Posts: 43

PostPosted: Tue Oct 23, 2018 3:47 pm    Post subject: Reply with quote

I see what you mean about the Histogram. I think this is a limit in the command in that it is counting values and will not show negative bars ( I will check further).

What you can do is use a Pivot command. Here is what I did...

Rows = a column of ones ( I took the abs of the column of 1 and -1)

Value = the column with your 1 and -1

Calculation = Sum

This worked for me and does allow a negative bar.

FYI -- if you just wanted the number, you could use the gear menu in the column list to add an accumulative sum column or a global variable that is the sum of a column.

Pamela
Back to top
View user's profile Send private message
74rk



Joined: 12 Apr 2018
Posts: 11
Location: Tilburg, The Netherlands

PostPosted: Wed Oct 24, 2018 4:29 am    Post subject: Reply with quote

Indeed the pivot option could do the trick. I'll try that one. I know the sum is easy to calculate. The running is is however what I'm interested in. Thanks for the reply!
_________________
René Knuvers
Sr. Engineer - LUCROS Railway Engineering
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    visualdatatools.com Forum Index -> Bug Report All times are GMT - 3 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group