Apnea Board Forum - CPAP | Sleep Apnea
Elapsed days glitch? - Printable Version

+- Apnea Board Forum - CPAP | Sleep Apnea (https://www.apneaboard.com/forums)
+-- Forum: Public Area (https://www.apneaboard.com/forums/Forum-Public-Area)
+--- Forum: Software Support Forum (https://www.apneaboard.com/forums/Forum-Software-Support-Forum)
+--- Thread: Elapsed days glitch? (/Thread-Elapsed-days-glitch)



Elapsed days glitch? - dr.wise - 04-22-2021

With interest in looking at possible relationships between my maximum pressure settings and AHI values, I printed out the history of machine settings from the statistics screen and then manually entered each day's maximum pressure into a previously created Excel analysis sheet that I use to look at other possible AHI value relationships. Since most settings were constant over long ranges of dates, this process wasn't too tedious.

The analysis sheet receives CPAP data by copying and pasting from an OSCAR export to CSV with the daily option. The analysis sheet's column A has dates, and columns B and C store details not available from OSCAR, like "excessively dry mouth." 

So I select a block in the CSV export file that includes dates and AHI and other columns that might be useful, and then I copy and paste that block into column D on the analysis sheet at the row corresponding to the first date in column A. Then I visually compare the two date columns to make sure they were lined up right and match in all rows before deleting the now redundant column D.

In other words, I'm confident that the date sequence in column A is valid.

But I realized that I might make mistakes in entering the machine settings (the maximum pressure values), so among other checks I looked at the number of cells in each date range. Excel displays this number for highlighted cells.

Almost all of them were spot on. But one range's number of days at a particular setting differed between OSCAR and the analysis sheet in Excel. OSCAR reports 204 days from Aug. 16, 2019 through March 20, 2020. Excel says there are 218.

How might this discrepancy have arisen?

I have verified the integrity of my date sequence in column A as above and again by creating a fresh sequence from scratch.


RE: Elapsed days glitch? - dr.wise - 04-22-2021

Never mind. Haste makes waste. 

I finally realized that this date range encompasses a trip we made to a remote island. Getting there and back often requires several days each way to wait for a ferry or other delays. The missing days in OSCAR almost certainly just correspond to days when I did not use the CPAP machine in hotel rooms or while waiting at airports or ferry terminals.


RE: Elapsed days glitch? - Crimson Nape - 04-22-2021

I'm glad we were helpful! Big Grin


RE: Elapsed days glitch? - dr.wise - 04-23-2021

Thanks for "being there." 

Now, for posterity, in case anyone ever stumbles across this thread (such as myself in the future when I can't remember what I did), I'll flesh it out a little further.

I confirmed that the travel dates don't appear in the daily exported file. So I've changed the Excel method. Instead of importing data from the CSV file's copied and pasted block, now I'm using Excel's VLOOKUP function, which of course is a topic of its own. If anyone isn't familiar with this valuable feature or has trouble with the formula, the web has lots of articles on it. 

In my situation, I open the CSV exported data file (as mentioned above, after selecting the daily option), select all (^A), copy (^C), and then paste (^V) it into a new sheet in the Excel analysis file.

Close the CSV file.

Back in the new Excel sheet of the analysis file, select all (^A), then Formulas, Name Manager, New, and assign a name, e.g., "CPAP" (without the quotation marks).

Now in the analysis sheet, to get the AHI values from the new data sheet, since AHI is the sixth column from the left, this formula works for row 11: 

  =VLOOKUP($A11,CPAP,6,FALSE)

The dollar sign gets the formula ready for copying to additional columns, one for each variable of interest, such as the Max EPAP, which is the 32nd column from the left in new CPAP data sheet, so its formula is:

  =VLOOKUP($A15,CPAP,32,FALSE)

Then copy these formulae down the columns for the instant results. Missing date rows display the inimitably cryptic #N/A error code.