Daily average report

I need to design a Crystal report that shows the average number of scheduled appointments per day in the next 4 weeks.
(This will be a rolling weekly report.)
The fields I am working with are "ApptDateTime" and "PatientNumber"  (Our database has no "ApptDate" field, so I usually work around this by using a parameter)
The results should look like this:
WEEK of
Mon
Tues
Wed
Thurs
Friday
AVERAGE# Appts
Aug 4
2
2
2
2
2
2
Aug 11
4
2
4
3
4
3
Aug 18
5
2
5
2
1
3
Any help would be greatly appreciated!

Hi,
A crosstab, as Brian suggests, is the ideal way to go about building such reports. Do note however, that it will skip any rows/columns that doesn't have any data in the database.
You don't want a crosstab that doesn't show the Weekday just because there aren't any appointments for that day for the next few weeks (very rare situation in my opinion).
It is still worth covering up for the not-so-obvious. You'll need to build a table in the database with a DateTime column that list all dates for perhaps the next two or more years and LEFT JOIN it to the existing ApptDateTime field. Throughout the report, wherever you've referenced the ApptDateTime field, replace that with the DateTime field from the new table.
Once you have the above sorted out, you have some more work before the Crosstab is ready. Here's what you need to do (Steps work only for CR 2008 or higher):
1) Add the record selection formula so that it gives the weekends a miss:
Not(datepart('w',{DateTimeField}) IN [1,7])
2) Create a formula called 'DayName' with this code:
datepart('w',{DateTimeField})
3) Insert the crosstab. Use the DateTime field as the Row and set it to the Print 'For each week' by clicking the options button
4) Use the 'DayName' field as the Column > Click Group Options > Options tab > Click 'Customize Group Name field' > Click the formula button beside 'Use a formula' and use this code:
WeekDayName(datepart('w',{DateTimeField}))
5) Use the PatientNumber field as the Summarized Field and change the Summary to 'Count'
6) Refresh the report and while in the Preview Mode, right-click the 'Total' Column > Select Column Grand Totals > Check 'Suppress Grand Totals'
7) Right-click column header for 'Friday' and select Calculated Member > Insert Column. A blank column with zero values is inserted
8) Right-click the blank header cell > Calculated Member > Edit Header Formula and type this:
"Average # Appts"
9) Next, Right-click one of the zero value cells in the newly added column > Calculated Member > Edit Calculation Formula and use this code:
local numbervar i;   
local numbervar avg;   
local numbervar cnt;  
for i := 0 to CurrentColumnIndex-1 do   
    avg := avg + (GridValueAt(CurrentRowIndex, i, CurrentSummaryIndex);   
    cnt := cnt + 1;   
avg/cnt;
Let me know how this goes.
-Abhilash

Similar Messages

  • Average Daily Balance Report

    Hi Guru,
    My SAP version is 4.5B. I would like to check is there any standard SAP program I can use to generate Average Daily Balance(ADB) in this version ?
    Hope to hear from you.
    Regards
    Andrew Tay

    Hi,
    Average Daily Balance Report is not available in SAP standard. If you want to create one more new report then
    create a Function Specification for the selection screen and output screen. Collect all the fields details with table name and mention the logic of the report and give it to ABAPER so that he/she can write a Technical Specification on the basis of
    your Functional Specification.
    Thanks & Regards
    R.K

  • MIS report : Daily Cumulative Report for contract in SD module

    Hi All,
               Do you have any idea about MIS report in SD module.actually my requirement is that
    i have to generate daily cumulative report for contract. that means at time i am selecting ten plants
    and correspondingly sum of  total quantity,average rate and average weight of all the contracts for particular plant  should be displayed in a column and various existing flavours should be displayed in a row.
    for above requirement following output format is there:
    plant ->           plant1               plant2              plant3 ....   .....
    flavour             quantity  rate     quantity  rate
    cumulative
    total cumulative
    please refer sample code,if any.
    Thks & Regards
    Shailesh

    Hi,
    You can ask your functional people what are the required fields to develop a report below are the table.
    customer related tables:
    KNA1 Customer master General Data
    KNB1 Customer Master – Co. Code Data
    KNKK Customer Master Credit Control Area Data
    KNVV Sales Area Data
    KNVI Customer Master Tax Indicator
    KNVP Partner Function
    KNVD Output type
    KNVS Customer Master Ship Data
    KLPA Customer/Vendor Link
    Sales Documents
    VBAK Sales Document - Header Data
    VBAP Sales Document - Item Data
    VBUK Header Status and Administrative Data
    VBKD Sales Document - Business Data
    VBUP Item Status
    VBPA Partners
    VBFA Document Flow
    VBEP Sales Document Schedule Line
    VBBE Sales Requirements: Individual Records
    Delivery Document
    LIKP Delivery header table
    LIPS Delivery item table
    Billing document:
    VBRK Billing document header table
    VBRP Billing Document Item table
    Shipping
    VEKP Shipping Header Table
    VEPO Shipping Item Table
    Thanks
    VIkranth

  • Daily Average Cash Balance

    Hi All,
    I have this report icreated on FISL ODS where I have to define "Daily Average Cash Balance". User is not sure what contitutes this definition. I would really appreciate if somebodt can give me an idea about it.
    Thnx.

    hi did u get the answer for this.... even i have same senario where i have to give a report on cash balance

  • HT6446 My Health Data is showing my total steps for Daily average....

    specs:
    Using Apple Health App, with the Withings Health Mate and My Fitness Pal as the only 2 sources.
    Using an iPhone 5s with  26.7 GB capacity 4.2 GB available
    Model Number NE299LL/A
    OS Version 8.1 (12B411)
    I Updated all my Apps. I have gone into the Health Apps "all Data, and cleared all" this reset my dashboard to 0 steps. then after closing and opening both apps. I am right back to where i started. my "Daily Average" is showing my total steps. (or possibly dividing by 1)

    Well, I have just completed a full restore of my iPhone. It was not smooth at first. The restore froze about 10% through and I ended up having to hard reset the phone and start over. The second restore went smoothly but unfortunately, this did not solve anything.  All 3 iPhone measuresble components (flights climbed, steps and walking + running distance) still show "No data". I always had the option to enter manual data points, but I never actually tried to as I have no way of determining these 3 things.
    I will call Apple support back, but their only option will be to replace the phone. I really don't want to do that, not only because I don't want to have to set up the device for a third time, but I dont want some white box device; I want my brand new, immaculate one. Besides, it's clearly a software issue and likely to happen again with a new device. I guess Apple won't look into this as a software issue until enough people call in about it. That said, please take a few minutes and call Apple about this if you're one of the people affected.
    I will report back after speaking with Apple, but as I said, I doubt they're going to have anything other than a device replacement as a solution.

  • Daily production report

    Hi, Is there any standard daily prod report available in sap? pls wht is the t-code?

    Dear Yadav,
    There are few reports available in standard SAP,but you have to check which one suits your business
    requirement.
    Check COOIS,CO28,MCPM,MCRE,MB51 for material document
    For further reports goto T Code SAP1->production planning->Production control or Information
    systems.
    Regards
    Mangalraj.S

  • Delay time data at Daily Production Report

    Hi all
    We hereby crated the Daily Production report which has the delay deatils of all depts. The delay details we are using with notifications. The problem is users required the shift wise delay according to the production.
    SAP std we couldnt keep the shift at notifications level (exit also helps but time couldnt assign). The Shift A is 7 am-3 pm, B- 3 pm to 11 pm. C- 11pm-7 am. The malfunaction start time some time may exceed from the A to B shift. But delay calculation hours is only one. With out going for hard coded how could assign the delay hours shift wise.
    At notification level is Capacity requirements will appear as per shift ?
    please suggest

    Hi,
    1.Select a capacity category for which the actual capacity requirements are to be calculated on the Capacities tab page in the resource.
    2.Choose ActCapReqmnts.
    3.The Settings for Determining the Actual Capacity Requirements dialog box appears.
    4.Set the Calc. actual cap. reqmts indicator.
    5.If the actual capacity requirements are to be calculated from activities:
    Enter one activity for each actual capacity requirement in Actual capacity requirements from activities. Determine the standard value parameter that identifies the corresponding activity.
    regards,
    Venkatesan Anandan

  • To prepare daily production report in grade wise

    Hi,
    Need your help regarding grade wise Finish Goods. My finish goods product code is in database 1601001. When bulk receipt from production how to separate grade wise quantity.
    Example:
    My production order quantity is 100000 pcs and receipt from production in stock is 95000 pcs. Now in 95000 pcs, 75000 are grade u201CAu201D quality and rest of 20000 pcs are u201CBu201D quality.
    There is any option that I can prepare daily production report in grade wise.
    Regards,
    Mizan

    Hi.....
    Go to Item master data whihc you want to maintain Gradewise.
    In general tab you find Serial or Batch Number under which just select Batch and select on every transaction......
    This will hjelp you to manage your inventory by Batches which you consider as grade......
    Regards,
    Rahul

  • Daily Stock Report for a trading industry

    Hi,
    I want a daily stock report for a trading industry. In this i want date wise opening stock, closing stock, outward quantity and inward quantity. How to get it?
    Thanks,
    Niranjan

    Hi,
    This is not easy as you think you have to develop this report by using SQL Query / Crystal report...
    Regards
    Chidambaram

  • Daily Production Report In coois

    Dear All
    When we r checking in Coois report for production entry Of SFG.FG--it will give us the Total qty,
    exactly we want that suppose one order qty is 15000 and i have put a production order of that Qty.  But according to Production Its going On With 500 or 600 per day produce.  then how can we see the production report of particular production confirmed qty and delivered qty  500 on which day . or we can see the Daily production report of Particular FG & SFG.
    Rgds
    Pankaj Agarwal

    Dear Pankaj,
    One way of addressing this issue is go to MB51, movement type 101 & 102 7 other relevant criteria.
    Plant n storage location.
    Execute>CtrlShftF12, you will see the list of material recvd. in the storage loc. you can also find the Production Order no.
    you can see when GR has happened against Prod. order.

  • Daily Production Report with Variance or receipt of Production

    Hi All..
    my one of the clients want the Daily Production Report with Variance or receipt of Product?
    Please let me know what does it mean and how can I fetch this report
    Thanks
    Rahul

    Hi Rahul,
    Try This
    Daily Receipt From Production report
    SELECT T1.[BaseRef] as 'Production Order No', T0.[DocNum] as 'Receipt No', T0.[DocDate] as 'Receipt Date', T0.[CardCode] as'Customer/Vendore Code', T0.[CardName], T2.[ItemCode], T2.[ItemName], T1.[Quantity] as 'Receipt Qty', T1.[OpenQty] as 'Open Qty against Pro Order' FROM OIGN T0  INNER JOIN IGN1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN OITM T2 ON T1.ItemCode = T2.ItemCode WHERE T0.[DocDate] >=[%0] and  T0.[DocDate] <=[%1] and
    T1.[BaseRef] IS NOT NULL
    Summary Report For Production Order
    SELECT T0.[DocNum] as 'Production Order No', T0.[PostDate], T0.[DueDate], T0.[RlsDate], T0.[CloseDate], T2.[ItemCode], T2.[ItemName], T3.[CardCode], T3.[CardName], T0.[PlannedQty], T0.[CmpltQty], T0.[RjctQty] , (T0.[PlannedQty]-T0.[CmpltQty]-T0.[RjctQty] ) as 'Open Qty' FROM OWOR T0  INNER JOIN WOR1 T1 ON T0.DocEntry = T1.DocEntry LEFT OUTER JOIN OITM T2 ON T1.ItemCode = T2.ItemCode LEFT OUTER JOIN OCRD T3 ON T0.CardCode = T3.CardCode WHERE T0.[PostDate] >=[%0] and  T0.[PostDate] <=[%1]
    Thanks,
    Srujal Patel

  • No data in Daily Activity Report

    Hi expert,
    There was no data in Daily Activity Report. But I changed the interval to 'Hourly', it displayed normally.
    Why?
    the version is 7.0 SP17
    Regards,
    Sidney

    Hi Raghu,
    That is what I do, but also no data.
    Does it need to set 'Save interval (minutes)' to 1440 in 'com.sap.portal.activityreport.core'?
    Regards,
    Sidney

  • Health app: bug in daily average for sleep in year view?

    I've manually entered sleep time for everyday since August 2014 in the Health app (on iOS 8, on an iPhone 6).
    In Day, Week, and Month view, the daily average seems correct (resp. 7h49, 7h09, 7h09).
    But it is obviously wrong in the Year view (12h36mn).
    Also the graph in the Year view is wrong. (The bar for August is twice as high as the one for October for instance.)
    (I've check -3 times- that these manually entered data were correct.)
    Does anybody experience the same problem?
    Or as any idea what the bars, in the Year Graph, are supposed to represent? (daily average for each month? or total sum of sleep time for the month?)
    Thanks in advance!
    Antoine

    The Health App really serves as a conduit between a variety of other apps that wouldn't ordinarily be able to talk to each other. The App Store has a section for apps that work with Health to be able to sync data.
    You can submit feedback to Apple here:
    http://www.apple.com/feedback
    Don't stress to much if you can't find a section dedicated to Health. Pick something under "iPhone" and just make sure you explain it well.

  • Daily Outstanding Report : Formula or Customer Exit

    Hello All,
    I am working on Daily Outstanding Report which is on 0FIAR_C02 Cube. in this cube i have 4 key figures 0DEBIT, 0CREDIT, 0BALANCE, 0SALES.
    There is one standard query  0FIAR_C02_Q1001 where i enter value for 0FISCAL YEAR / PERIOD = 009.2009 then i will get Period Balance means AR balance for that period, Sales for the previous period (means for 008.2009) and DSO which is formula from the above 2 keyfigures. this report shows me data for only one month as i have to enter it in the selection screen.
    My requirement is : in the selection screen i will give interval 009.2009 to 011.2009 then it should show me that report for Each Month. now to get the data for Period Balance i took cumulative balance so it is coming perfactly but HOW TO DEAL WITH SALES FOR THE PREVIOUS PERIOD for everymonth menas for SEPTEMBER i should be able to get get AUGUST VALUE for SALES same way for OCTOBER i should be able to get the value for SEPTEMBER and so on...
    Do i require to write a Customer Exit code or with any formula it is possible ?
    Please let me know.
    Regards,
    Komik Shah

    Hi Marsanaidu,
    Thanks for your reply.
    Can you send me a customer exit code with offset value. how to do this ?
    Regards,
    Komik Shah

  • Daily metrics report of Exchange usage

    Hello Everyone,
       I was delegated the task to find a way to perform an daily metrics report of our new exchange system and am at a loss of how to begin. We have recently rolled out an Exchange 2013 on premise deployment to serve 6000 accounts. Our environment consists
    of 6 dual role exchange servers.The request was that I present a daily report with the following criteria I/O counts, CPU usage, Storage, bandwidth, etc.
    Any suggestions are greatly appreciated 

    Hi sanoske312,
    I suggest ask Script Center for help so that you can get more professional suggestions. For your convenience:
    https://technet.microsoft.com/en-us/scriptcenter/dd742246.aspx?f=255&MSPPError=-2147217396
    Thanks
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact [email protected]
    Mavis Huang
    TechNet Community Support

Maybe you are looking for

  • Is it possible to get both a 3,5mm headphone jack and a 3,5mm microphone jack?

    Hey! I recently bought a headset for my 2012 MacBook Air, and it came with two cables. One for sound (green) and one for the microphone (pink). The MBA has only got one 3,5mm jack though, so i was just wondering if its possible to use a normal 3,5mm

  • Nano better than mini?

    My mini ipod has been giving me lots of problems (like bad battery, hardd drive problems, etc..). I am considering buying a nano or the video ipod. Do they bring the same problems as the mini or were those problems overcome? Thanks! AMy

  • Broken link - pdf doc - Oracle lifetime datasheet

    There are plenty reference to this below url which doesn't work anymore : http://www.oracle.com/support/library/data-sheet/oracle-lifetime-support-policy-datasheet.pdf As I understand, it has been replaced by this one : http://www.oracle.com/support/

  • How can i use analytic function on these data

    hi , i have the following data: id start end 1 11-oct-2006 03:00:34 12-oct-2006 09:00:10 1 09-oct-2006 05:00:23 11-oct-2006 03:00:34 1 08-oct-2006 03:00:23 09-oct-2006 05:00:23 2 11-oct-2006 11:00:00 11-oct-2006 14:00:00 1 08-oct-2006 03:00:00 08-oct

  • Cannot do a SL Server 10.6 remote install

    Hi! I'm a newbe to the server environment and came to a halt emediately in trying to learn. I follow the Mac OSX Server Essentials 10.6 book and the first step is to do a remote install from another computer to the server, in my case a Mac Mini. I ca