if I have two dates in the following format "28-SEP-2018 12.40.00" in separate columns, does anyone know how can I create a new third column which can produce the result of the formula below.
(0.1+sum(DATE_1)- sum(DATE_2))/(0.1+sum(DATE_2))*100
Related
as a step to create my dimensional data model I need to combine two columns and create one new referencing to the units of values from each columns.
I have among other tables one table that has yearly GDP of a country. the table has two columns GDP represented as MONEY (unit) and the other year change (% as unit). in my fact table I would like to have both in same column but with a new columns representing dimension (units). because of that I am wondering how to merge these two columns and create another one that would specify if the value comes from the column with units (%) or (money). this applies to other entities in the data model that can have different units for same variable.
thanks for your help!
Consider orginal data format :
enter image description here
We have quartal dates a series of economic indicator and their values, on the right side there is another table with dimensions of the economic indicator.
What I need is to change data so it should be like this (fact table with quartal date granularity) :
enter image description here
I have reproduced the above scenario with a sample data and able to combine the columns like below.
My sample data of two columns Money and Unit:
Use derived column transformation for the res column which will have the Unit or Money values. To know which column value, I have used another column which_value.
Expression for res column:
iif(isNull(Money),Unit,Money)
Expression for which_value column:
iif(isNull(Money), 'Unit', 'Money')
Result in Data preview:
In Quicksight, I have data like this:
What I am trying to do:
I want a chart that shows the sum of amount over created_date WITH the sum of amount over resolved_date (that second part is the challenge, the first one is easy). So it is kind of using dates as an X-axis, just that they are different date fields (created_date and resolved_date). Is there a way of doing this?
I need a single formula for summing numbers that fall within an arbitrary number of date ranges.
You can use multiple SUMIFS() for each date range and then sum the result of those SUMIFS()s within a single cell like this:
=SUMIFS(dataRange, datesRange,">="&startDate, D:D,"<="&endDate) +
SUMIFS(dataRange, datesRange,">="&startDate, D:D,"<="&endDate) +
SUMIFS(dataRange, datesRange,">="&startDate, D:D,"<="&endDate)
But this requires that I know exactly how many date ranges I'm going to have.
For my spreadsheet I won't know how many date ranges I will have, so it has to dynamically grab the dates ranges.
Sample Google Spreadsheet (currently editable, please feel free to use)
You can use SUMIF in conjunction with the SUMPRODUCT function that multiplies components in the given arrays, and returns the sum of those products.
This can be done as below:
=SUMPRODUCT(SUMIFS(E:E,D:D,">="&A4:A100,D:D,"<="&B4:B100))
In Tableau, I am trying to figure out how to sum up the percentages of two columns. I calculated the percentages using the percentages of command and used the table option, from the analysis menu. This generated the table shown below. I would like a column that sums the 4 and 5 columns together to show a total percentage of 59.76 which is 26.83+32.93 from columns 4 and 5. How would I create this calculated field?
How I generated the percentages:
I have an excel worksheet with several entries of column data. The data is arranged in pairs such that the first column contains dates and the second contains time series data corresponding to that date. So for example time series 1 will be in columns A and B where is is the dates and B is the data. Column C is blank before columns D and E contain the entries for time series 2 and so on and so forth...
How do I merge these into a single file in Matlab where the dates match up? Specifically I would want the first column to contain the dates and the other columns to contain the data. I have tried to do this with fts and merge functions but so far failed..
You could grab the dates like this: dates = [raw{:,1}]' and the data like this data = reshape([raw{:, 2:3:end}]', size(raw,1), []); to get normal matlab matrices in case you want to manipulate them in matlab.
Otherwise if you just want to send them straight back to excel then:
data = [raw(:,1) reshape(raw(:, 2:3:end)];
xlswrite(...blablafilename_etc..., data);
But in this case you should have use a VBA macro :/