I am trying to compare dates within an excel spreadsheet. The first column is the date/time the Windows user profile service starts. The second column is the date/time a particular service initiates a system shutdown. I want to create a report of all the dates that do not have a date in the second column between two consecutive dates in the first.
Any ideas on how this could be most easily accomplished? Any suggestions on where to start? Any help would be appreciated.
I asume your list is sorted on the 1st column and all date/time are really recognized as date/time by Excel (i.e. numeric). Now you want to find all rows without a shutdown date where the next row's starting date is 1 higher as this row's starting date ... meaning the integer part of next row's date/time is exactly 1 more than the integer part of this row's date/time
Create a new column "Condition" containing the formula
[C2] =AND((B2="");INT(A3)-INT(A2)=1)
and copy it all the way down; then use an Autofilter and filter for "TRUE"
example:
[A] [B] [C v] [D]
----------------------.-----------------------.----------------.----------------------------
[1] startup . shutdown . condition . comment
[2] 10.09.2011 17:45 . 10.09.2011 18:21 . FALSE .
[3] 11.09.2011 15:50 . 11.09.2011 16:26 . FALSE .
[4] 12.09.2011 13:55 . . TRUE .
[5] 13.09.2011 12:00 . 13.09.2011 12:36 . FALSE .
[6] 14.09.2011 11:59 . . FALSE . next row is same date
[7] 14.09.2011 14:08 . 14.09.2011 14:44 . FALSE .
I hope I understood your problem correctly ....
Related
Good Day , Please can I get some help with the following
I have the following cubevalue formula which counts the distinct suppliers in an area
=CUBEVALUE("ThisWorkbookDataModel","[Query1].[SOURCING SPLIT].[All].[LOCAL]","[Query1].[SOURCING REPORTING PRODUCT].[All].[KNITWEAR]","[Query1].[Gender].[All]","[Measures].[distinct count of Supplier Name]")
The above formula returns an answer = 5
I would like to filter and have a distinct count of only the suppliers where season orders were Greater than 0, the answer should then be 2
the measure for the season's orders is: [Measures].[sum of S’22 units]
so I would like to add to the formula and filter . . . [Measures].[sum of S’22 units]>0 -- Hope this makes sense
I have also tried with Cubeset
The following formula returns 5 in the cubesetcount and should return 3 after applying a filter
=CUBESET("ThisWorkbookDataModel","([Query1].[SOURCING SPLIT].[All].[LOCAL],[Query1].[SOURCING REPORTING PRODUCT].[All].[KNITWEAR],NONEMPTY([Measures].[sum of S'22 Units]))*[TFG Supplier Name].children","DSups")
I want to add a filter here so that it only applies where Units for the supplier were > 0 . . . so I would like to add to the formula and filter . . . [Measures].[sum of S’22 units]>0 -- Hope this makes sense
I am stumped as to how to apply this condition and would appreciate any help please
in PowerBI I need to calculate the datediff between the date on the row to the maximum date possible on the table
Example
Table A ( this table has no id for each row)
Row . Date
1 . 1-jan-2000
2. 7-jan-2000
3. 8-jan-2000
4. 10-jan-2000
5. 31-jan-2000
What I am trying to get
Row . Date . Maximum Date in Table Calculated Column DateDiff (days)
1 . 1-jan-2000 . 31-jan-2000 30
2. 7-jan-2000 . 31-jan-2000 24
3. 8-jan-2000 . 31-jan-2000 23
4. 10-jan-2000 . 31-jan-2000 21
5. 31-jan-2000 . 31-jan-2000 0
I have tried to create a measure of the max date, and used last date, but when looking at the row it just gives the date as the current date of the row and not its max date of the table
every row should have the same maximum date, and i can then calculate the diff between the date on the row and the max date
I started with data given below -
Step 1:-
Make Sure your Date Column in the Table belongs to data type "Date".
Step 2:-
Create a calculated column using DAX then, with the DateDiff function
Date Diff = DATEDIFF(MyTable[Date],MAX(MyTable[Date]),DAY)
Here is a link to learn the DATEDIFF function.
The output looks like below :-
Kindly accept the answer if it works for you or let me know if it doesn't.
I have a column indicating the demand over time, a column indicating the supply cumulative volume available (always the same regardless of the time) and the price corresponding to each supply volume.
It looks like this:
demand supply price
30 5 3
12 10 7
13 15 11
23 20 13
3 25 15
22 30 21
. . .
. . .
. . .
I need in a new column, for each demand volume, the clearing price of the corresponding supply volume capable to satisfy the demand (for example in the 3rd row, the cleared price=15 is the price associated to a supply=25 which is the minimum greater volume capable to cover the demand=23). This would result as:
demand supply price cleared price
18 5 3 13
12 10 7 11
13 15 11 11
23 20 13 15
3 25 15 3
20 30 21 13
. . . .
. . . .
. . . .
I am trying with functions as: LOOKUP, INDEX, MATCH...for instance tryiong to find the smallest positive difference between supply and demand, but at the moment I'm struggling in finding a solution. Anyone has ideas? Thank you in advance
if demand in column A, price in column C and cleared price (to find out) in column D you could use :
=INDEX($C$2:$C$128, IF(ISERROR(MATCH(A2,$B$2:$B$128,1)),1, IF(INDEX($B$2:$B$128,MATCH(A2,$B$2:$B$128,1))=A2,MATCH(A2,$B$2:$B$128,1),MATCH(A2,$B$2:$B$128,1)+1)))
I think I have managed now to do something close to what I want doing:
=INDEX($F$2:$F$128;IFNA(MATCH(D2;$G$2:$G$128;1)+1;1))
MATCH is used to find out which row of the supply is greater than the demand (I add 1 because it didn't work with "greater than", so I use "smaller than" and I select the next row)
IFNA corrects to 1 those values that because of the function "smaller than" were N/A, as the demand was smaller than any possible supply.
INDEX associates the price to the MATCH result.
I still have to go through the list, but it seems to be all right.
I have excel files (hundreds of them) that look like this (sensor output):
Column1 Column2 Column3
Serial Number:
10004
Ref. Temp:
25C
Ref. Pressure:
1KPa
Time Temp. Pres.
1 21 1
2 22 1.1
3 23 1.2
. . .
. . .
. . .
I want to split this into two parts, the information section (top part) and data section (the rest), something like this:
Information section
Column1 Column2 Column3
Serial Number:
10004
Ref. Temp:
25C
Ref. Pressure:
1KPa
Data section:
Column1 Column2 Column3
Time Temp. Pres.
1 21 1
2 22 1.1
3 23 1.2
. . .
. . .
. . .
if it converts to data frame I don't want the first row and column become header and index of the data frame. I am using python 2.7 and numpy.
Make two copies of the worksheet.
In copy A, start a loop, going on the first column looking for the word Time. Once it finds it, let it delete anything before it.
Remember the row in a variable.
In copy B, delete anything after the remembered row to row number 2^20.
I have a dataset (in Excel) consisting of quarterly observations.
For each of these Observations, I also have an exact date and time, like:
Obs.value, 20000101, 07:00.
Also I created an eViews Workfile with 10 Minute frequency.
Now I want to import that quarterly data to the eViews workfile.
For all (10min frequency) observations where there is no corresponding value in the data, the observation value should be zero. That means in the end I need to have a 10 Min frequency vector with one observation value per quarter and zeros otherwise:
.
.
.
.
20000101, 06:50, 0
20000101, 07:00, Obs. Value (one per quarter)
20000101, 07:10, 0
.
.
.
Does anyone know how to programm that in eViews?
For those finding this...looks like it was resolved over on the Eviews forums.
http://forums.eviews.com/viewtopic.php?f=3&t=9068