KQL - Unable to set time range - azure

I am trying to obtain update information from all our Intune managed devices using KQL, I am using UCClientUpdateStatus, which works fine when setting time range to the last 7 days, when I change to a specific month, ie 3 months ago, it returns nothing, doesn't matter how long ago I set, it could be 3 months, 6 months, 9 months, I always get the below message:
No results found from the specified time range
Try selecting another time range
I am new at KQL so I know nothing :D just trying to help my company audit some changes.
Does anyone know how to set the time range appropriately?
Many thanks

Related

Reinvoice every 12 months

Trying to create an invoice to auto populate. Have done this in VBA previously, but now the sheet is going on the cloud, and being used by Excel online so, VBA is out, unfortunately!
Trying to make a membership fee reappear every 12 months based on their start date!
I was trying around with EDATE, and got it to work on my test subject, but then realized it wouldn't work as I'm only going off the first 12 months!
Need a fresh set of eyes to give me ideas, or walk me through a simple solution (if possible)
Currently have the following, which works for the first year, then it won't!
Cell X7 = =EDATE(TODAY(),3) <----- Creates the cut off for invoicing if Membership due before then.
Cell V12 = =VLOOKUP(O12,'Youth Details'!$A$4:$H$95,8,0) <---- Returns their start date. i.e 19-Nov-2020
Cell W12 = =IF(AND(V12>TODAY(),V12<X7),"True", "False") <---- Returns if they have been with us for 9 months to 12 months and needs to be invoiced!
That works, for their first year, then the following year it won't invoice them as they've been there for 24 months.
I was thinking about expanding my VLOOKUP in cell V12, that if there membership was over 12 months ago, to add 12 to it, but got confused!
Any suggestions on where to go from here?
One way to do it might be
Figure the number of months they've been a member, like say 34.
Use the MOD() modulus function with a divisor of 12 (months). This will discard the number of whole 12-month-periods (years) they've been a member and leave you with just the number of months since their last anniversary. So for 34, it'd give "10" months since their 2-year anniversary.
If the answer from #2 says they're getting close to renewal, like they're 9+ months in to their current membership year, invoice them.
Cell V12: =VLOOKUP(O12,'Youth Details'!$A$4:$H$95,8,0) <---- Returns their start date, like 1-Jan-2019
Cell V13: =DATEDIF(V12, TODAY(), "M") <---- Total # of months they've been a member, like 34
Cell W12: =IF(MOD(V13, 12) >= 9, "True", "False") <---- Returns if it's been 9+ months since their last anniversary and they need to be invoiced!
Of course, if you allow people to prepay, then like AakashM points out it's worth making sure you're not invoicing them for something they've already paid.

Sharepoint date and time column validation

Google searches are producing complex formulas that I don't understand.
It seems simple enough what I want to accomplish.
I have a calendar date selector that I wish to restrict the selection to within 7 days. I don't want the user to be able to select a date in the past or past 7 days.
My syntax started off as =[Checkin Date]>=TODAY()
This works well to restrict a selection in the past. How do I add to this formula so that the user cannot select a date 7 days past the current date?
Can't seem to wrap my head around it need assistance, thanks.
You may try below list validation formula.
=IF(INT(OrderDate-NOW())>=-7,TRUE,FALSE)
=AND([Due Date]>=TODAY(),[Due Date]<=(TODAY()+7))
This code does exactly what I wanted.
It does not allow the user to select a date in the past, it also will not let the user select a date past 7 days. Perfecto

Excel Sumproduct not working when the condition time and date are put together?

I have a worksheet that is a schedule, and I'm trying to create a graphical display [not chart] of how many people are working per hour window. Before I added the dates, which needed to be done so that shifts starting in the evening and going over midnight could be computed, it was working fine except for midnight shifts. The formula I was using is:
=SUMPRODUCT(F$53:F$67>=($C86+INT(F$5)),F$69:F$83<($D86+INT(F$5)))
Before the date addition, this was working fine[Except for the aforementioned problem]:
=SUMPRODUCT(F$53:F$67>=$C86,F$69:F$83
To where, $C86, is the start time 1-Feb 0:00, and $D86, is the end time 1-Feb 0:59. +INT(F$5) changes the date from 1-feb to an integer to be added to the hour time blocks. I also tried using COUNTIFS to no avail.
Screencap:
First off, is the way I am computing this possible? Secondly, is there a better way to do this? Thanks.

IF COUNTIFS() on filtered data

Question:
=IF((COUNTIFS(Data!F:F,35,Data!H:H,E2))<=0,"Future",(COUNTIFS(Data!F:F,35,Data!H:H,E2)))
The above doesn't work on filtered data. I've scowered the internet and failed to find a solution after hours of trying. I managed to find a solution for a single count on a different column:
=SUMPRODUCT(SUBTOTAL(3,OFFSET(Data!G:G,ROW(Data!G:G)-MIN(ROW(Data!G:G)),,1)),ISNUMBER(SEARCH(A3,Data!G:G))+0)
I cannot figure out how to manipulate this in order to find the count of rows with both values of 35 and E2. Any ideas?
Back story:
I have a system which is used for a service desk. This has tickets on it which have recorded data on them.
Worksheet 1 (Data):
I have exported this data into a spreadsheet to create trend charts on. The data collected is:
ID, Tag, Department, Month Created, Month Resolved, Week Created and Week Resolved.
I have then created another column which works out the difference in weeks (i.e. how many weeks it takes to resolve a ticket) and applied a filter to these columns.
Worksheet 2 (Count Data):
I have a table that counts the Amount of tickets created and resolved each week. Also I have another table that counts how many were resolved by how many weeks it took to be resolved, for example there are 235 tickets, that were created in week 35 and took less then 1 week to be resolved.
Worksheet 3 (Charts):
I have two charts that show the resolution/creation trends over the weeks and the counts of each week by how long the tickets took to resolve.
Problem:
Quite a simple spreadsheet however when I filter the Data's department to only show specific departments the charts remain unchanged. It turns out this is because the COUNTIF and COUNTIFS functions count regardless of filters. How do I get around the COUNTIFS issue?
=IF((SUMPRODUCT(SUBTOTAL(3,OFFSET(Data!H2,ROW(Data!H:H)-ROW(Data!H2),)),(Data!F:‌​F=35)*(Data!H:H=E3)))<=0,"Future",(SUMPRODUCT(SUBTOTAL(3,OFFSET(Data!H2,ROW(Data!‌​H:H)-ROW(Data!H2),)),(Data!F:F=35)*(Data!H:H=E3))))
This is how I solved the issue.

Excel - Find if worker has worked certain OT if weekday and or Sunday

I have a worksheet with days running along the columns, within each day there are different hourly categories, 130%, 150%, 200% and 215% etc, there are other categories within each day, but these are not to be included. (Can't post Image as new, can email?)
If a worker works over 3.5 hours in any of these categories they get an extra lunch, except on Sunday's where they must work 4 hours.
I've been using countif's to check each day over 3.5, and another column for Sunday's.
The weekday and Sunday can be combined into the same column as the lunch price is still the same, just number of working hours different.
The main problem is I have to adjust the countif's every month, I want something that will look at days of the week and/or sunday's and check without adjusting every month.
Have been trying to get my head around sumproduct with countif!
Any help, very much appreciated.
Thanks!
Since you have not mentioned what is where this might take some adjustment, but may get you started:
=IF(SUM(B3:G3)>=IF(WEEKDAY(B$1)=1,4,3.5),"lunch","no lunch")

Resources