I am trying to program the system where you choose day of week and in a text field next to it you should be able to chose the time of the day in increment of 15 min + or -. Which of joins should I use for txt field and how to put default time in the field?
You would just need to use an initialised value for the default time and have it incremented +/- as needed. Text entry join numbers can be the same as text feedback joins but it's better to use different ones.
Related
I'm adding data to a spreadsheet and I want to do basic tasks programmatically.
Every time I add a date like 03/01/2022 the month cells updates to "March" with
ARRAYFORMULA(IF(E2:E = "","", TEXT(E2:E,"mmmm")))
So, I'm counting the entries per month like this:
I created a formula to make a sequence, but it'll go infinitely as per the number of rows, I'd like to reset the count when the Month cell is different than the previous one.
=SEQUENCE(ROWS(B2:B))
David, I assume "Month" is in column B and you want the sequence in column A under "No."
Try using this formula in A2:
=arrayformula(if(B2:B="",,countifs(B2:B,B2:B,row(B2:B),"<="&row(B2:B))))
Briefly:
uses the arrayformula so you don't have to copy down the formula
if(B2:B="",, takes care of any blanks
countifs() along with row() does the rest of the magic.
to see the role of row(), try using just countif(B2:B, B2:B). This will give the total number of occurrences of "January. "February", etc.
row() combined with "<="&row() makes sure that the formula counts occurrences above the current row only.
Watch out for year change. All "January" values across different years will be added to the sequence.
Good luck.
I was spending a whole day to find a way to keep the column filter searching regardless the number of characters being inputted. At the moment, i.e the date column stops filtering after the 12th character is entered as I have a custom search condition which requires a longer than a 12-character input.
The link below is what it looks like what I have implemented
https://datatables.net/examples/api/multi_filter.html
In my case, I try to get it work on the Start Date filter to allow date range filtering. For instance, when you search
ie. 2012/09/26
it returns one record and that is correct. Console log also
and when you search
ie. 2012/09/26 2012
it doesn't display any records nor trigger any keypress events (ie. $.fn.dataTable.ext.search.push()) which perform filtering after 2012/09/26 2 ie. 012.... The function is only triggered for the first 12 characters.
You can try it on jsfiddle.net/4udkchf8/3 which I've just created so that you can replicate the issue. When you enter upto to 2008/09/26 20, you see the value is logged to the console but any characters after than ie. '2008/09/26 201...`.
Can anyone shed light on how to achieve that?
Regards,
I have a recordset where rows have a date field.Rows are from current year and last year. I want to see the count of rows per year. That's easy. Now I'd like to have a third column with difference (count(currentYear) - count(lastYear)). Is there any way to achieve this?
thanks
It seems like you want to have the difference calculated between two members of the same date field.
If so, you might want to consider the customizeCell() API call to retrieve the count values of each year, use them to calculate the difference, and modify the necessary cells with the result.
Alternatively, you could try modifying your data set so that the lastYear and currentYear are two different fields – this, for example, would allow you to compare them within a calculated value.
The fields look as described above. They are time fields from SQL imported as a varchar. I had to format as date in tableau. There can be NULL values, so I am having a tough time getting over that. Tableau statement I have is only ([time spent])+([time waited])+([time solved)].
Thank you!
If you only want to use the result for a graphical visualization of what took the longest, you can split and add all the values into seconds and using it into your view. E.g.
In this case the HH:MM:SS fields are Strings for Tableau.
The formula used to sum the three fields is:
//transforms everything into seconds for each variable
zn((INT(SPLIT([Time Spent],':',1))*3600))
+
zn((INT(SPLIT([Time Spent],":",2))*60))
+
zn((INT(SPLIT([Time Spent],":",3))))
+
zn((INT(SPLIT([Time Waited],':',1))*3600))
+
zn((INT(SPLIT([Time Waited],":",2))*60))
+
zn((INT(SPLIT([Time Waited],":",3))))
+
zn((INT(SPLIT([Time Solved],':',1))*3600))
+
zn((INT(SPLIT([Time Solved],":",2))*60))
+
zn((INT(SPLIT([Time Solved],":",3))))
Quick explanation of the formula:
I SPLIT every field three times, one for the hours, minutes and seconds, adding all the values.
There is an INT formula that will convert the strings into integers.
There is also a ZN for every field - this will make Null fields become Zeros.
You can also use the value as integer if you want, e.g. the Case A has a Total Time of 5310 seconds.
The best approach is usually to store dates in the database in a date field instead of in a string. That might mean a data prep/cleanup step before you get to Tableau, but it will help with efficiency, simplicity and robustness ever after.
You can present dates in many formats, including hh:mm, when the underlying representation is a date datatype. See the custom date options on the format pane in Tableau for example. But storing dates as formatted strings and converting them to something else for calculations is really doing things the hard way.
If you have no choice but to read in strings and convert them to dates, then you should look at the DateParse function.
Either way, decide what a null date means and make sure your calculations behave well in that case -- unless you can enforce that the date field not contain nulls in the database.
One example would be a field called Completed_Date in a table of Work_Orders. You could determine that a null Completed_Date meant the work order had not been fulfilled yet, and thus allow nulls for that field. But you could also have the database enforce that another field, say Submitted_Date, could never be null.
How to extract only rows with hour and not half hour i libreoffice
2014/06/15 19:30:00
2014/06/15 20:00:00
2014/06/15 20:30:00
=>
2014/06/15 20:00:00
It turned out that i could:
extract the time part using a =right(D1;8)
Do a =IF(MINUTE(D1)<>0,"",1)
Sort by the 1's and remove the empty cells.
But, there must be a better and more neat way.
Nicolai
As moggi pointed out, it depends on the way the time data is presented:
If your values are valid date/time values for LO Calc, you can just apply the MINUTE() function to the complete value to extract the minutes, and compare it with 0. "Valid date/time" means that, e.g. the date/time value 2014/06/15 19:30:00 is internally represented as double value 40343.8125. Displaying this as date/time is a matter of formatting. You can check this by manually entering the double value into a unformatted cell and change the formatting to a date value.
If your values are text values, you may use a regex to match full-hour time values with something like .*[:digit:]{2}:00:00$. You can use this regex in Menu Data -> Filters -> Standard Filter or Advanced Filter; don't forget to enable Regular Expressions under the filter's Options.