We have an Excel spreadsheet for an on-call rotator schedule. I would like to post a Teams message each Monday with the people assigned for that week.
Example spreadsheet:
Date
Team 1
Team 2
7/4
X
A
7/11
Y
C
7/18
X
B
7/25
Z
A
Example Teams message:
On call for week of 7/4: X and A
The struggle I am having is reading the data from Excel. I can format the spreadsheet to something that works but I don't know how to extract the team member's based on the day. Is that possible to do with Power Automate?
You could use a Filter Query with an expression and the utcNow function in the list rows action.
Below is an example of that approach.
Add a Recurrence action
a. Configure it to run every Monday
Add a List Rows action
a. Use the following value with an expression with a utcNow function for the Filter Query
Date eq '#{utcNow('MM/dd/yyyy')}'
Add a Post message in a chat or channel
a. Use the following expression with a concat function for the Message field
Concat('On call for week of ', utcNow('M/d'), ': ', first(outputs('List_rows_present_in_a_table')?['body/value'])?['Team 1'], ' and ', first(outputs('List_rows_present_in_a_table')?['body/value'])?['Team 2'])
Flow Setup - Get Rota details from Excel and post to Microsoft Teams
Related
I have 2 columns in my google sheet - Time, and some Ids
My aim is to calculate the number of ids reported in an hour. For example, from this image we can tell from 10AM to 11AM - 4 ids, and from 11AM to 12PM - 5 ids. I want to come up with a QUERY Function ONLY that helps me do so, and group the number of IDs hour-wise. Any help would be much appreciated.
use:
=QUERY(QUERY(A2:B,
"select hour(A),count(B) where B is not null group by hour(A)"),
"offset 1", )
Use this
=ArrayFormula({"Hour","Id's";UNIQUE(HOUR(A1:A18)),COUNTIF(IF(B:B="",,HOUR(A:A)),"="&UNIQUE(HOUR(A1:A18))&"")})
Using Lambda
You need to set the range refrence once, like this example A:B.
=ArrayFormula(
LAMBDA(r, LAMBDA(t,i,
{"Hour","Id's";UNIQUE(t),COUNTIF(t,"="&UNIQUE(t))})
(HOUR(INDEX(r,,1)),INDEX(r,,2)))
(QUERY({A:B}," where Col1 is not null ")))
Explanatoin
What we did is Query where Col1 non empty in the first lambda call and
in the second lambda we name col1 t for time with the call HOUR(INDEX(r,,1))
and col1 i for id's with the call INDEX(r,,2)
and we use the two columns in COUNTIF that can be simplified like this.
COUNTIF(t,"="&UNIQUE(t))
Now we join UNIQUE(t) and COUNTIF in an Array {}
{"Hour","Id's";UNIQUE(t),COUNTIF(t,"="&UNIQUE(t))}
I'm using Google sheets, and I want to get the data from one sheet to another where I want only the columns with count > 1.
Let's say we have 3 columns A, B, and C. I tried the following (the first sheet name is "Form Responses 1"):
I thought about using a query in the second sheet as: =query('Form Responses 1'!A1:Z, "Select A having count (A) >1 union select B having count (B) >1 union select C having count (C) > 1"). But I got a parse error where it seems that union and having are not supported in google sheets query.
How can I achieve this (whether it's using query or any other Google sheets function that can work)?
More details:
The first sheet contains info about exercises conducted during a lecture and it gets its data from a Google Form (so the responses are fed in this sheet). Here is a screenshot of it:
Please note that the form is divided into sections. When the user selects the course, the attendance, the participation, and adds a comment, then they go to the next section, the next section will be based on the selected course, the newly opened section will have the exercise name and rating questions (the exercise name is a dropdown list with items that are prefilled and specific to the selected course). That's why, you can see that "exercise name" and "rate the exercise" columns are repeated because we have 2 sections in this form.
The second sheet should contain the data of a selected course only (either mobile dev or web dev) which can be achieved easily through a query with a where clause. But, in addition to that, it shouldn't contain the empty columns of "exercise name" and "rate the exercise" as they correspond to another section. So, it should have only one exercise name column and one rating column that correspond to the selected course. Here is a screenshot if we only use a query with where clause without removing the extra name and rating columns:
Here is a screenshot with the desired result:
Thanks.
why not use just:
=QUERY('Form Responses 1'!A1:Z, "select A,B,C,D,E,F,G where F is not null", 1)
Use "OR" condition
Eg:-
QUERY(Data!A:R,"select A, N, P where N>0 or P>0")
where A column has country and N, P columns have population values
How can we select the most recent record for the unidata queries.
Is there any function or command we can use?
I have data as
Student Term Program Term_Start_date
1, 2018Fall , ABC, 08/01/2018
1, 2018Spring, MATH, 01/01/2018
1, 2017Fall, HIST, 08/01/2017
2, 2017Fall, ENG, 08/01/2017
2, 2017Summer, MATH, 05/01/2017
I want to see the out put as this- Most recent term start date should show per student.
Student Term Program Term_Start_date
1, 2018Fall , ABC, 08/01/2018
2, 2017Fall, ENG, 08/01/2017
I have used the BY.DSND SAMPLE 1 but it gets only one record
Well outside of writing a UniBasic program to parse the data, you can use an "I or V" type VOC entry to call in concert with the LIST query. Something like this.
DISCLAIMER: Don't make entries or delete entries in your UniData database if you're not comfortable or experienced in UniData. There is NOT an "Undo" button.
Don't enter the quoted text. This is just to highlight what is going on.
AE VOC TEST "TEST or any name that isn't in use"
I "For Insert"
I "I Type entry"
DCOUNT(TERM,#VM); EXTRACT(#RECORD,3,#,0)
PRESS Enter
FI
At this point you have a virtual VOC entry that you can call as a condition to your "LIST" query. Like this.
LIST STUDENT TERM PROGRAM DATE WHEN DATE = TEST
This will return the last multivalued record for the TERM attribute per student. This is assuming that TERM is multivalued and that STUDENT is a singlevalued attribute. How this works is that it's counting the value marks and then returning the record and associated attributes based on the count.
The file has to be set up with single/multivalued combination for the DCOUNT function to be able to count per singlevalued attribute. In this instance a STUDENT can have many TERM's with each TERM having it's own date. Now this isn't a logical sort, it's not ranking dates based on a calendar, but rather based on the order they appear in the file.
01-01-18
05-01-17
01-01-09 <-- Date Returned
--- First Answer ---
If you're using Uniquery:
LIST CUSTMST ALL BY.DSND #ID SAMPLE 1
Which will sort the file by a value and then just select 1 record.
I'd like to count a text-string in every page on a report and print out the count of the strings in the page-footer.
Searching for a string in a text field is straight forward, counting the findings within the text-field too, but how is it possible to sum the findings in a integer variable per report-page when it has several entries?
i.e. I´ve got a report-page like this where each new line is a new record.
Here the first report-page:
aaaaaaF
aaaaaFF
ffaaaaaaaaa
FaaaaaFF
Now the page-footer:
There are 4 records. The letter "F" has been found 6 times on this report page.
Now the second report-page:
aaaFaaF
aaaaaF
fFaaaaaaaaa
FaaaFaFF
FFaaaaFa
page-footer:
There are 5 records. The letter "F" has been found 10 times on this report page.
I'd be happy if smdy has an advice for me.
Thanks!
First step is to figure out how many occurances of "f" occur in each record. Which you can do using
= Len([myField]) - Len(Replace([myField],"f",""))
Now for the total occurances in that page you use the Sum function in a text box in the report footer section.
= Sum( ... )
= Sum(Len([myField]) - Len(Replace([myField],"f",""))) ' if report based on a table
= Sum([myCalculatedField]) ' if you use the occurance count formula in the query instead
If you need to total across the page there is a link detailing how to go about it here (you'll have to scroll down a bit)
http://office.microsoft.com/en-us/access-help/summing-in-reports-HA001122444.aspx
You haven't shown any of the expressions that you are using but, essentially, in the Report Footer you would include a textbox which uses your aggregate function:
=COUNT([SomeField]) 'or
=SUM(iif(some condition, 1, 0))
where SomeField is a field in the detail section, or some condition refers to this field.
That is, you need to SUM (or COUNT) across the whole report by referring to field(s) in the details section. You do not do this by attempting to refer to the subtotals that you have in the page-footers - this won't work.
I have a database which currently records the amount of times someone does a certain procedure and they scores they have received. The scoring is done by select a value of either N, B or C.
I currently have written a query which will count the total number of times a procedure is done and the amount of times each score is received.
Here is the result of the query (original: http://www.flickr.com/photos/mattcripps/6673555339/)
and here is the code
TRANSFORM Count(ed.[Entry ID]) AS [CountOfEntry ID]
SELECT ap.AdultProcedureName, ap.Target, Count(ed.[Entry ID]) AS [Total Of Entry ID]
FROM tblAdultProcedures AS ap LEFT JOIN tblEntryData AS ed ON ap.AdultProcedureName = ed.[Adult Procedure]
GROUP BY ap.AdultProcedureName, ap.Target
PIVOT ed.Grade;
If a score of N or B is given that is deemed below standard and C is deemed at standard. Is there a way I can add something to my query which will show me in percentage how many of the procedures we at standard and how many below?
I really cant get my head round this so any help would be great.
Thanks in advance
UPDATE TabProd
SET PrecProd = (PrecProd * 1.1)
WHERE Código IN (1,2,3,4)
I did something very similar to this on a pretty large scale.
My issue was the need to be able to run queries over specific (but user variable) timeframes and output similar percentage of total results in a report.
I won't get into the date issue but my solution was to run the "sum" function on the total line on my specific reject criteria to get totals of the rejects then use a divide expression to create a new column element (defined expression) in the same query pulling from the joined table of "Total net production" - joined by a common reference - job ID.
For your case it sounds like you want to sum the two failure types - which you would simply add defined expressions dividing your total instances into your various failure modes and formatting in your output report as percents. To finish the data portion of your report you then need a third expression defining your "non-fail percent" - which would be 1.0 - N/total - B/total - both of which you will have previously defined in the query to determine the N and B failure rates.
Then its a matter of pulling that information into your report and formatting. It definitely CAN be done.
Hope this helps.