I'm struggling with calculating new columns as I'm still new to Spotfire.
I am given two Date columns (format: mm/dd/yyyy), one is "Created" and the other is "Closed" as shown below in the left two columns.
The end goal is to have two new columns (shown above in right two columns):
1. Date column with daily interval (format: mm/dd/yyyy)
2. Number of occurrences that where open on that day based on all rows in the "Created" and "Closed" columns
Hopefully this makes sense, please let me know if it does not. I really appreciate the help and look forward to learning - thanks!
It seems like you are trying to add records with a calculation, which is not possible. Spotfire will only work with the data that is there.
You'll need to start with a table that has one record per day.
Related
I have a problem with extracting the data from dataset. In my company project has some processes, which are grouped in categories. So I have one project which has many processes grouped. On the basis of column "D" I would like to get the first data and the last date from every kind of category. For example, for project 20.28 I would like to have start date from row 5 and finish date from row 4. I hundreds of projects divided into categories so making it manually isn't and option here. Below is a sample.
Sample data set
I have a solution based on consecutive filters with formulas. If this works to you I'll post here the steps.
https://drive.google.com/file/d/1pdxMGRDl_sV5wRmqIFouDQs8L43LVxgi/view?usp=sharing
I'm looking a way to add an extra column in a pivot table that that averages the sum of the count for the months ("Count of records" column) within a time period that is selected (currently 2016 - one month, 2017 - full year, 2018 - 5 month). Every month would have the same number based on the year average, needs to be dynamically changing when selecting different period: full year or for example 4 months. I need the column within the pivot table, so it could be used for a future pivot chart.
I can't simply use average as all my records appear only once and I use Count to aggregate those numbers ("Count of records" column).
My current data looks like this:
The final result should look like this:
I assume that it somehow can be done with the help of "calculated filed" option but I couldn't make it work now.
Greatly appreciate any help!
Using the DataModel (built in to Excel 2013 and later) you can write really cool formulas inside PivotTables called Measures that can do this kind of thing. Take the example below:
As you can see, the Cust Count & Average field gives a count of transactions by month but also gives the average of those monthly readings for the subtotal lines (i.e. the 2017 Total and 2018 Total lines) using the below DAX formula:
=AVERAGEX(SUMMARIZE(Table1,[Customer (Month)],"x",COUNTA(Table1[Customer])),[x])
That just says "Summarize this table by count of the customer field by month, call the resulting summarization field 'x', and then give me the average of that field x".
Because DAX measures are executed within the context of the PivotTable, you get the count that you want for months, and you get the average that you want for the yearly subtotals.
Hard to explain, but demonstrates that DAX can certainly do this for you.
See my answer at the following link for an example of how to add data to the DataModel and how to subsequently write measures:
Using the Excel SMALL function with filtering criteria AND ignoring zeros
I also recommend grabbing yourself a book called Supercharge Excel when you learn to write DAX by Matt Allington, and perhaps even taking his awesome online course, because it covers this kind of thing very well, and will save you significant head-scratching compared to going it alone.
I've encountered an issue with a pivot table that I occasionally use, though I don't update. Specifically there are three Row Fields applied Year, Day (d-mon format), and then Transaction Date/Time (which displays only the hour component of the value). The pivot table is supposed to sort by Year, then Day, then Hour. The first two sorts work fine, but the third has started to sort the Hour values as text rather than numbers, so it's ordered 1 AM, 1 PM, 10 AM, 10 PM, etc. I've checked and there are no non-time values in the source field, the column of the pivot table itself is still set to a Time format type, and there are no filters applied to the field.
At this point I'm not sure what else to look for. Any assistance would be much appreciated.
UPDATE: The file is in Sharepoint so I tried taking the prior version (there are only two), dropping in the latest data from the current version, and refreshing the pivot table. The error dutifully appeared. So it does appear to be a data issue, but I can't imagine what's causing the issue. As stated above, I already checked that the values were Dates, specifically I used =IF(NOT(ISERROR(DATEVALUE(TEXT(C2, "m/d/yyyy h:mm"))), "", 1) and checked that all rows returned as blanks.
Something that may be causing issues is how the Year and Day fields come about. Specifically, there are no such fields in the Source Data, they are calculated Row Fields based on the one Transaction Date/Time column. I'm not even sure how this was done (to my knowledge calculated fields can only be columns) so I can't really look into if it may be causing the errors.
I also had this problem and found no good way around it in Excel. What I ended up doing (that worked for me) is to extract the 24hour "hour value" from a date field using =VALUE(TEXT(A2,"h")) (where A2 contains the time/date code I'm looking for). I then used the date code itself (Column A in this example) as the first Row Label (first grouped item) then added the "hour value" as a secondary Row Label/Group. This allows leveraging the Pivot Table sort/group function naturally and then adds the detail in the order I want.
I did not solve the problem for 12 hour display with AM/PM as this was good enough for my needs.
A simple question, but some quick Googling did not prove fruitful.
Basically, I have a column called "uniqueID", which is a unique identifier for all the people in my dataset. Most uniqueIDs have multiple records, because there is one record per year that the person stayed at university. What I'd like to do is create a "time period" variable, where first year, t= 1, second year t=2, third year t=3 etc. for each unique ID.
The following is faster IF YOUR SPREADSHEET IS SORTED by your unique id;
=IF(A2=A1,B1+1,1)
(assumes that above formula is in column B and that data begins on row 2)
and, of course, copied down for all rows as described above.
You will find that in a spreadsheet containing many rows that COUNTIF is very slow since you are looking up through ever-increasing range sizes.
I'm trying to make a spreadsheet that I can easily take an export from Mint.com's CSV outputs and get them into my Excel budget.
To do so, I need a way to populate each field within a date range. I'd like to avoid macros if possible (I don't know how to make them).
I'm happy to share my finished .xls with the public!
I've imported Mint.com's data in a manner that has column S for the date (3/30), column V with the cash value that I need to add up, and column X for the spending category.
I need to tally each month's spending ($V) by category (column X).
Through research, I devised this (for my January "Gas & Fuel" spending):
=SUMIFS($W$2:$W$900, $T$2:$T$900, ">="&W$12, $T$2:$T$900, "<"&(EOMONTH(D$1,0)+1), $Y$2:$Y$900, "="&$B5)
However, it required that I reformat my Dates, which is an issue because this would become specific to each year and I would need to change the fields every year. I'd like the document to be usable without adjustment using my spending data from the past and future.
Is there a way to take the year out of the equation? To make that formula above work, I renamed my column from "January" to "1/14".
Here is what the spreadsheet looks like
Thanks!
A pivot table would work best with that data.
Initial set up would show each day separately, but by using Grouping
(here) ^^^
you can group the data by month/day/year/however