Hi, What must be formula for, two different date column in different sheets.
HOUR(sheet1([date1])-(sheet2([date2])/24 is it true? Or what need to be?
@Etwo_Cargo are you asking this as a Spreadsheet formula or as an AppSheet expression?
@Levent_KULACOGLU Dear Levent, The second one. AppSheet expression.
HOUR( ANY(SELECT(Table1[Date1],{Yes/No})) - ANY(SELECT(Table2[Date2],{Yes/No})) )/24
@Levent_KULACOGLU says SELECT has invalid inputs.
@Etwo_Cargo {Yes/No} part in my example is a conditional expression that will evaluate to true to filter out the data gathered by SELECT. Like: ANY(SELECT(Table1[Date1], [Date1]>=TODAY ()))
HOUR(LOOKUP(KeyVal1, โSheet1โ, โSheet1KeyColโ, โSheet1DateColโ) - LOOKUP(KeyVal2, โSheet2โ, โSheet2KeyColโ, โSheet2DateColโ)) / 24
LOOKUP(โฆ) gets a single value from a specific column of a specific row in a table. Similar to @Levent_KULACOGLUโs ANY(SELECT(โฆ)) expressions.
KeyVal1 and KeyVal2 represent the KEY column values in Sheet1 and Sheet2, respectfully, that uniquely identify the rows that contain the dates you want to compare.
โSheet1โ and โSheet2โ are the names of the two AppSheet tables.
โSheet1KeyColโ is the name of the KEY column in Sheet1 where [KeyVal1] will be found. Likewise for โSheet2KeyColโ.
โSheet1DateColโ is the name of the column in Sheet1 that contains the date you want to use. Likewise for โSheet2DateColโ.
The expression above is equivalent to:
HOUR(ANY(SELECT(Sheet1[Sheet1DateCol], ([Sheet1KeyCol] = KeyVal1)) - ANY(SELECT(Sheet2[Sheet2DateCol], ([Sheet2KeyCol] = KeyVal2))) / 24
User | Count |
---|---|
15 | |
11 | |
9 | |
7 | |
3 |