I'm trying to group StartDateTime in Business Objects. Data for StartDateTime is coming from a Cisco server. It is in format 7/15/2013 10:52 AM. I am just trying to group these so it's 7/1, 7/2, etc.
I need to create a dimension out of this Day Grouping so I can represent a count of events on each date. Right now I am doing:
=FormatDate([Query 1 (1)].[Startdatetime];"DD")
I've tried variations of this, but nothing is working. I used the above formula to group the hours, I just replaced "DD" with "HH", so not sure why this formula would be so different.
Any ideas? Thank you. It's appreciated.
what if you try
=FormatDate([Query 1 (1)].[Startdatetime];"dd/MM/yyyy")
This is old but wasn't answered. In case anyone stumbles upon this like I just did, the formula is just case sensitive. It should be:
=FormatDate([Query 1 (1)].[Startdatetime];"MM/dd")
Here's a link that includes all permutations of date formatting:
https://blogs.sap.com/2013/11/21/how-to-use-formulae-to-change-date-and-time-formats-in-webintelligence/
Related
I'm trying to solve this problem since some days now but it seems I have reached a dead end. Maybe someone would be able to help me.
I have two sheets. The first one contains the list of my clients and their delivery number depending of the weekday.
In my second sheet I would like to get the delivery number of the client (red cells) depending of the weekday I select (yellow cells).
I tried VLOOKUP formula, INDEX/MATCH, QUERY but I wasn't able to find a way to get the delivery number depending of the client's name and the weekday. I think the main issue is that in the first sheet the weekday is a column title.
Maybe the solution is simply to build my tables differently...
Thank you for your help
You can try something like this, assuming A2 and B2 the cells of first name and first day to look:
=INDEX(Sheet1!$1:$1000,MATCH(A2,Sheet1!$A:$A,0),MATCH(B2,Sheet1!$1:$1,0))
Or, if you want this same formula for the full column:
=byrow(A2:A,lambda(each,if(each="","",INDEX(Sheet1!$1:$1000,MATCH(each,Sheet1!$A:$A,0),MATCH(offset(each,0,1),Sheet1!$1:$1,0)))))
Also doable (are perhaps more simply) using a MAP/FILTER; with your 'Caption 1' table in Sheet1!A1:D4 and your 'Caption 2' table at the top-left of Sheet2, the following in Sheet2!C2 gives you the delivery number for a many names/days as you enter in the columns alongside:
=map(A2:A,B2:B,lambda(name,day,ifna(filter(filter(Sheet1!B2:D4,Sheet1!A2:A4=name),Sheet1!B1:D1=day))))
N.B. The IFNA blanks out errors for those rows where a Name/Day pair hasn't been entered yet. Extend the ranges in the filter to suit your real data.
all you need is simple vlookup:
=INDEX(IFNA(VLOOKUP(A9:A11&B9:B11,
SPLIT(FLATTEN(A2:A4&B1:D1&""&B2:D4), ""), 2, )))
The filter query in this flow doesn't appear to be working as expected. I know for certain that the items it emails out afterwards have the first two toggles set to false. Is there something in the syntax that I'm missing? Or possibly in the date/time comparisons? This is my first dive into Power Automate, and its with someone elses flow. So any insight is greatly appreciated.
This is an example of what it looks like after running, and getting items where Confirmed = false.
Thank_x0020_You_x0020_Sent eq 'false' and Confirmed eq 'true' and EventDate lt '2021-07-20T00:00:00.0000000' and EventDate ge '2021-07-19'
Assuming EventDate is a DateTime data type, instead of the raw outputs try:
formatDateTime(outputs('<actionName>'), 'yyyy-MM-ddTHH:mm:ss')
It seems to me that having so many conditions for the query is not a good idea and less if dates are used.
It is better to do the query with one or two conditions and then filter the received data within an apply to each step
The first two conditions are Yes/No Columns, so they need to be 0 or 1 (not true/false) Silly mistake, don't know how I missed that.
I agree with both previous comments for cleaning up the query in general.
I am using pandas & I have a dataframe with Date, Item#, Qty and 12 months of sales data. I want to do a std dev calc to understand the monthly variability for each Item#.
The problem is for many Item#'s the sales are sporadic: I may only sell Item XYZ in Feb and Mar, and zero the rest of the months of the year.
I am using this code to do the heavy lifting:
df.groupby('Item#').resample('M').sum()
For some Item#'s it is forcing zeros into the empty months (GOOD!), but in many cases it is just showing, say, two months of data, instead of 12, which then makes the std dev calculation incorrect.
Can someone help me understand why this behaviour of the .resample method? How can I workaround this problem?
Many thanks in advance for your help!
I have some trouble with getting the correct output of a Eloquent Query.
$checkIn = date(request()->checkin);
$checkOut = date(request()->checkout);
$bookedRooms = App\Booking::whereBetween('checkin', [$checkin, $checkout])->whereBetween('checkout', [$checkin, $checkout])->pluck('room_id');
$availabileRooms = App\Room::whereNotIn('id', $bookedRooms->toArray())->sum('number_of_rooms');
What I have is a checkin and checkout date.
It is a database for a Hotel.
The Hotel has Rooms. There a different types of Rooms, and each Room can exist multiple times. That is set in the Room-table with an integer value of the rooms available in column number_of_rooms
What I want, it the output of the percentage that is still available of a specific Room and the total availability of Rooms in the date range.
I thought that it can be achieved with the code given before, but that can be not.
Can someone help me out? Probably it's simpler then I can think of now..
i looked your code, but could you please tell me one thing. what is the date format of checkin and checkout you getting.
make sure that you getting date format is like 2019-07-04 (YYYY-mm-dd).
i hope this will help you.
Good morning,
I'm currently working on a custom date for a label. It needs to read the last 2 numbers of the current year, followed by the number of day it is within the current year (8/3/2016 would be day 216). So if I were to print a label, the date on 8/3/2016 should read 16216. The following is the current code in the formula:
toText(CurrentDate,"yy") & DateDiff ("d", #1/1#, today) + 1
For reasons I'm unfamiliar with, this returns 16216.00. My question is how do I get rid of the decimal places with this being a text field?
If taken by themselves, toText(CurrentDate,"yy" returns 16 and DateDiff ("d", #1/1#, today) + 1 does return 216. It's only when concatenated that the decimal places appear. Is there a better way to do this?
I'm fairly new to using Crystal, so any help would be appreciated.
Thanks, guys.
You are looking for the Julian date. You have a couple of options
SELECT DATEPART(yy, #date), DATEPART(dy, #date)
SELECT RIGHT(CAST(DATEPART(yy, #date) AS char(4)),2)
The link below goes into much further detail
http://blogs.msmvps.com/robfarley/2009/03/25/converting-to-and-from-julian-format-in-t-sql/