List all dates in date range even if there is no record for that day

Hi,
I have a really simple report but am having a problem with dates.
I want to list sales per day over a date range (start date and end date parameters).
The data i am working with may not have sales on every day which is causing grief with my average calculations.
I need to capture days in current month which i have with DateDiff ("d", {?Start Date}, {?End Date}+1)
Then days elapsed in the month. This is where my problem is. I have grouped my data by day to get day totals, and have then attempted to use a summary on DISTINCT COUNT to get the result i need. The problem is it only counts the lines that are there, so if a day has no sales it is skipped and the count is incorrect and then the average calculations i have are not correct.
Help will be much appreciated.

YOu can not create data that does not exist.
You will need to add in a table which has all dates and make that you first table with all other data joined with a left out from this date table.
Ian

Similar Messages

  • I have a production mobile Flex app that uses RemoteObject calls for all data access, and it's working well, except for a new remote call I just added that only fails when running with a release build.  The same call works fine when running on the device

    I have a production mobile Flex app that uses RemoteObject calls for all data access, and it's working well, except for a new remote call I just added that only fails when running with a release build. The same call works fine when running on the device (iPhone) using debug build. When running with a release build, the result handler is never called (nor is the fault handler called). Viewing the BlazeDS logs in debug mode, the call is received and send back with data. I've narrowed it down to what seems to be a data size issue.
    I have targeted one specific data call that returns in the String value a string length of 44kb, which fails in the release build (result or fault handler never called), but the result handler is called as expected in debug build. When I do not populate the String value (in server side Java code) on the object (just set it empty string), the result handler is then called, and the object is returned (release build).
    The custom object being returned in the call is a very a simple object, with getters/setters for simple types boolean, int, String, and one org.23c.dom.Document type. This same object type is used on other other RemoteObject calls (different data) and works fine (release and debug builds). I originally was returning as a Document, but, just to make sure this wasn't the problem, changed the value to be returned to a String, just to rule out XML/Dom issues in serialization.
    I don't understand 1) why the release build vs. debug build behavior is different for a RemoteObject call, 2) why the calls work in debug build when sending over a somewhat large (but, not unreasonable) amount of data in a String object, but not in release build.
    I have't tried to find out exactly where the failure point in size is, but, not sure that's even relevant, since 44kb isn't an unreasonable size to expect.
    By turning on the Debug mode in BlazeDS, I can see the object and it's attributes being serialized and everything looks good there. The calls are received and processed appropriately in BlazeDS for both debug and release build testing.
    Anyone have an idea on other things to try to debug/resolve this?
    Platform testing is BlazeDS 4, Flashbuilder 4.7, Websphere 8 server, iPhone (iOS 7.1.2). Tried using multiple Flex SDK's 4.12 to the latest 4.13, with no change in behavior.
    Thanks!

    After a week's worth of debugging, I found the issue.
    The Java type returned from the call was defined as ArrayList.  Changing it to List resolved the problem.
    I'm not sure why ArrayList isn't a valid return type, I've been looking at the Adobe docs, and still can't see why this isn't valid.  And, why it works in Debug mode and not in Release build is even stranger.  Maybe someone can shed some light on the logic here to me.

  • Dax Calculate column even when there is no record at a date

    We are creating a powerpivot model based on a table with data about worktasks of our employees.
    This is simplified our input:
    Tasknr date started dateended
    1 20140101 20140201 (yyyymmdd)
    2 20140102 20140103
    3 20140104 20140108
    Etc
    We created two measures to calculate how many tasks are opened and closed per day. That was no problem, but now the tricky part. We also want to know each day how many tasks are
    still open, even on days that no tasks are opened (or closed).
    My approach was to create a calculated column to determine how many tasks are opened up to that date and subtracted the closed tasks and end up with the tasks that are open. That
    seems to be working :
    =COUNTROWS(FILTER(Tasks; Tasks[Open]<=EARLIER(Tasks[Open]))) - COUNTROWS(FILTER(Tasks; Tasks[Close]<=EARLIER(Tasks[Open])))
    When I load this to the excel pivot I end up with this:
    Row Labels| Opened | Closed | Open not finished
    1/1/2014
            1         
    0          1
    1/2/2014        
    1          0         
    2
    1/3/2014
            0         
    1         0
    1/4/2014
            1         
    0         2
    The line with 1/3/2014 should have 1 in the column [opened not finished], but because that calculation is linked to the opendate column, not to the closed and 3/1/2014 no task
    was opened, there is no value. On days that no tasks are opened or closed there even is no line at all although there could be tasks that are still open.
    I need a mechanism that calculates the value even when there are no records
    on a particular day. Our users want to be able to view the results on any date they select.
    I have considered a second table with all the dates and calculate columns from the task-table but are there other ways to do this? I searched this forum but did not find an answer
    so far.

    Hi Jacob,
    In our company we have a standard date table that is included in all of our models. What I didn't want to do in this case was to extend that table with calculated fields to solve this issue. Alternative was to create a new date table with the calculated
    fields I needed. But I don't like that also so what I did was rewrite the sql that loaded the data into the pivot so that the measures were calculated at the load. But I am also not happy with that solution because of maintanance and performance reasons. My
    feeling is that there must be a way to solve this with only dax in the loaded table.
    Jacob's answer does exactly what you want. The DAX expression in his response is a measure which you could put in your Tasks table. You don't need to alter your date dimension in any way.
    The key to this technique is that the date table cannot have an active relationship to your Tasks table. (although you could have an inactive relationship and then you could use the USERELATIONSHIP function to make other measures easier to calculate)
    Translating Jocob's measure into something against a 'Tasks' table would looks like the following:
    =
    CALCULATE (
    COUNTROWS ( Tasks ),
    FILTER (
    Tasks,
    Tasks[Open] <= MAX ( Calendar[Date] )
    && Tasks[Closed] >= MAX ( Calendar[Date] )
    http://darren.gosbell.com - please mark correct answers

  • Date range stops working when I add record selection criteria

    I have a simple report, using only nine fields, from four tables, plus two date parameter fields that I use to set a date range:
    SELECT "Job"."Job", "Job_Operation"."Vendor", "Customer"."Customer", "Job"."Part_Number", "Delivery"."Promised_Date", "Job_Operation"."Status", "Job_Operation"."Sched_End", "Job_Operation"."Sched_Start", "Job_Operation"."Operation_Service"
    FROM   ("TECH"."dbo"."Delivery" "Delivery" INNER JOIN ("TECH"."dbo"."Job_Operation" "Job_Operation" INNER JOIN "TECH"."dbo"."Job" "Job" ON "Job_Operation"."Job"="Job"."Job") ON "Delivery"."Job"="Job"."Job") INNER JOIN "TECH"."dbo"."Customer" "Customer" ON "Job"."Customer"="Customer"."Customer"
    WHERE  (("Job_Operation"."Sched_End">={ts '2013-08-05 00:00:00'} AND "Job_Operation"."Sched_End"<{ts '2013-08-08 00:00:01'}) AND "Job_Operation"."Status"='O' OR "Job_Operation"."Status"='S' AND "Job_Operation"."Operation_Service"='150-170 SS' OR ("Job_Operation"."Operation_Service"='150-170 ST' OR "Job_Operation"."Operation_Service"='60-180' OR "Job_Operation"."Operation_Service"='180-200 SS' OR "Job_Operation"."Operation_Service"='180-200 ST' OR "Job_Operation"."Operation_Service"='200-220 ST' OR "Job_Operation"."Operation_Service"='F-1.1923'))
    ORDER BY "Job"."Job"
    When my record selection formula is
    {Job_Operation.Sched_End} IN {?StartDate} TO {?EndDate}
    AND
    {Job_Operation.Status} = 'O' OR {Job_Operation.Status} = 'S'
    the date range works.
    However, when my record selection formula is
    {Job_Operation.Sched_End} IN {?StartDate} TO {?EndDate}
    AND
    {Job_Operation.Status} = 'O' OR {Job_Operation.Status} = 'S'
    AND
    {Job_Operation.Operation_Service} = '150-170 SS' OR
    {Job_Operation.Operation_Service} = '150-170 ST' OR
    {Job_Operation.Operation_Service} = '60-180' OR
    {Job_Operation.Operation_Service} = '180-200 SS' OR
    {Job_Operation.Operation_Service} = '180-200 ST' OR
    {Job_Operation.Operation_Service} = '200-220 ST' OR
    {Job_Operation.Operation_Service} = 'F-1.1923'
    the date range doesn't work. Instead, the report returns records with all kinds of {Job_Operation.Sched_End} dates.
    What could be the reason?
    Thanks,
    Matteo

    Hi Matteo,
    Try this as the selection formula:
    {Job_Operation.Sched_End} IN {?StartDate} TO {?EndDate}
    AND
    ({Job_Operation.Status} = 'O' OR {Job_Operation.Status} = 'S')
    AND
    {Job_Operation.Operation_Service} = '150-170 SS' OR
    {Job_Operation.Operation_Service} = '150-170 ST' OR
    {Job_Operation.Operation_Service} = '60-180' OR
    {Job_Operation.Operation_Service} = '180-200 SS' OR
    {Job_Operation.Operation_Service} = '180-200 ST' OR
    {Job_Operation.Operation_Service} = '200-220 ST' OR
    {Job_Operation.Operation_Service} = 'F-1.1923'
    -Abhilash

  • I just migrate settings and software from my PowerBook to a new Mac Pro. All the software download from CC is there and working, except for CC, and there is not way to install.

    I just migrate settings and software, include CC, from my PowerBook to a new Mac Pro. All the software download from CC is there and working, except for CC, and there is not way to install. I have try because every time I restar keep bothering asking for installation, (by the way, the link is not up to date). Will appreciate your help.

    never migrate adobe software.  it should be properly installed.
    uninstall all the cc programs you can, clean and then reinstall per, Use the CC Cleaner Tool to solve installation problems | CC, CS3-CS6

  • Good Evening, I would like to know from that day Apple will sell unlocked iPhone 5?

    Good Evening, I would like to know from that day Apple will sell unlocked iPhone 5?

    There is no such information currently available because Apple is not currently selling unlocked iPhones 5s anywhere. When they announce that information then you will know along with the rest of us users here.

  • Events has incorrect date range even though photos have been correctly adjusted

    I'm using iPhoto '11 (9.1.2) and have imported a bunch of old photos that had incorrect exif data, presumably from the camera having the wrong date set at the time.  For example I have an event called "Christmas 08" which contained photos dated from 4-6 Dec 2028; which I've since deduced were actually taken 4-6 Jan 2008.  Knowing that iPhoto can correct this sort of error I used the Photos > Adjust date and time menu option to take over 7200 days off the images and overwrite the originals into the bargain.  Initially the results looked good - all the photos from the 26 affected events now show the correct date information in the info panel and when one of the events is selected the date range shown in the info panel reflects the new date range of the photos within it. 
    Weirdly though, the dates shown underneath the event are still the 2028 dates and the event is still ordered chronologically after my recent 2011 photos - consequently these events are considered "within the last 12 months" by iTunes even though the photos are all correctly identified as around 2.5 years old. Presumably this will mean that these events are set float at the top of my events list and plague me for the next 17 years unless this gets fixed.
    What should I be doing to make iPhoto do the right thing?
    Thanks,
    Rob

    This has been reported several times in iPhoto '11 version 9.1.2 - it appears to be a bug - the only reported workaround that has been posted is to correct the dates on the photos and create a new event with them - try flagging all of the photos in the bad event after the dates are correct and then create a new event from the flagged photos
    You can search the forums to see the other discussions
    I would expect a correction in a future upgrade
    do report to Apple - iPhoto menu ==> provide iPhoto feedback
    LN

  • Cascading Pick List with date range as first,  second pick list is dynamic

    Specifically, how is this accomplished?
    It does not seem possible to make first pick list static. If allowed this would be perfect.
    The system seems to only allow the first parameter to be dynamic if the second parameter is dynamic. No range seems to be available for date when second parameter is  dynamic.

    Consider a 3rd-party tool as a solution (for a list of such tools, see http://www.kenhamady.com/bookmarks.html).
    There is at least one Crystal report viewer with its own special implementation of dynamic & cascading parameters.  It would allow you to use any type of parameter within the cascade.  However, you will need to create a separate rpt to implement each dynamic parameter.  So in your case, you will have one main report, using a dynamic parameter that's implemented as a separate rpt, which has a date range parameter. 
    Cheers,
    - ido

  • How to list all data elements

    Hi,
    I'm trying to write a rtf template for debugging purposes that simply lists all fields in the input data.
    I wouldn't mind seeing the raw xml structure passed into the fo processor.
    Is there a simple way doing that with xsl template?
    Thanks a lot!

    Hi,
    You could use the following in an XSL-XML template. This will return the whole XML document:
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
      <xsl:output method="xml" encoding="UTF-8"/>
      <xsl:template match="/">
        <xsl:for-each select=".">
            <xsl:copy-of select="."/>
        </xsl:for-each>
      </xsl:template>
    </xsl:stylesheet>Regards,
    Cj

  • HT1655 my i pod shuffle (3rd genration ) is not seeing in itune and all data is erased from there.

    hi i try to reset ipod shuffle(3G) via itunes but as i chossen dan all data got erased from ipod and now i can connect my ipod to itunes

    The three music came with your operating system.
    Sync is only oneway, from PC to your device.  Unless you have the music on your PC, iTunes is going to wipe out what you have on your device if you are syncing to a new library.
    You can only transfer Purchased music over to Itunes on your PC.
    iTunes Store: Transferring purchases from your iOS device or iPod to a computer
    http://support.apple.com/kb/HT1848
    As for you own music, you may have to use a third party software.  A good Free one is called Sharepod which you can download from Download.com here: 
    http://download.cnet.com/SharePod/3000-2141_4-10794489.html?tag=mncol;2

  • Date display setup - is there configuration file option for this?

    I have just installed SQL Developer and am loving it BUT since I am a long time SQL*Navigator user, one thing floored me.
    In SQL*Navigator, there is preference you can set that will display all dates in the format you want, I don't see that option here in SQL*Developer. It is defaulting to yy-mm-dd. I understand I can alter my session or use a to_char function to get the date in the format I want, but isn't there a configuration file somewhere or preference I can set to the date/time format I would like to display each time I use SQL*Developer???????

    Oracok, there is no way to do this in SQL Developer according to the oracle.com website:
    http://www.oracle.com/technology/products/database/sql_developer/howtos/howto_policy_date_formats.html
    As for wanting to be able to do this - Seconded. I would love it if there was an equivalent to the SQL*Plus glogin.sql that could be run every time SQL Developer opened.
    -Natalka
    http://toolkit.rdbms-insight.com

  • There is no "add tab or + tab" and no "list all tabs" button. I'm also missing the add-on bar that is supposed to be at the bottom. I'd love to try all the features but it's hard to do without these options.

    The first day I downloaded Firefox 4, I had the "+" tab at the end of the tabs but after the first day, it disappeared so to open new tabs, I have to go to the Firefox tab on the left or use ctrl+t to open new tabs.
    The "list all tabs" button appears sporadically and today is completely unavailable.
    The add-on bar has never been available.
    The "feedback" button appeared the first day or so then disappeared, never to appear again!

    Create a new profile exclusively for the Firefox 4 version and create a desktop shortcut with -P "profile" appended to the target to launch that profile.
    * http://kb.mozillazine.org/Testing_pre-release_versions
    * http://kb.mozillazine.org/Creating_a_new_Firefox_profile_on_Windows
    * http://kb.mozillazine.org/Shortcut_to_a_specific_profile
    * http://kb.mozillazine.org/Using_multiple_profiles_-_Firefox

  • I have "un-synched" all music on my iPhone 5s, but there are still some albums that I can't delete. Suggestion?

    I have "un-synched" all music on my iPhone 5s, but there are still a few albums that were not deleted. When I check "On This Phone" in iTunes, those albums that remain show in dark print, while those deleted remain a lighter text. I have followed suggestions by others as to how to delete "All" music on the phone, but nothing has worked. Any suggestions?  Thanks!

    First of all... You don't need a credit card to make an Apple ID.
    To buy Paid apps, you can use an iTunes card or an Appstore card.
    Also, I'm not sure you can download music you got from email to your music on your phone.
    However, I think you can download the music you got from your email on your computer, transfer it to iTunes, and then sync your phone. That should work.
    And I don't think you can share files via bluetooth with other phones.

  • I Deleted my icloud account and then deleted a game for space I then downloaded it again and all data was lost but I have an itunes backup on my pc before all data was deleted can I restore my ipad to that date and get my data back the game is deerhunter

    So on Deer Hunter 2014 I had all my data but before that I changed my apple id email so I deleted my old icloud and logged in again. So after that I deleted Deer Hunter 2014 for some temporary space and then redownloaded it again, all my data was gone and I was back to the beggining but before this incident I backed up my Ipad on itunes on my pc. Can I use this backup to restore my data to that point in time if not is there a way I can (I did not purchase anything in the game so I cant restore purchases).
    Thanks in advanced

    Its solved I just restored it to that point

  • I got an iphone 3. I backed it up. When I plugged in the other iphone 3g none of my data transferred. I plugged in the old one and all data is wiped from there too. Where the **** is my data??? my 3gs

    I backed up my iphone 3gs and had the intention of transferring the data to another iphone 3gs. Nothing imported and the old phone is wiped clean. Where is my data?

    You can not access the backup directly.
    Did you restore your replacement from this backup?
    If so then you already have everything in the backup on your device.
    If not, you can wipe the device and restore from this backup:
    Settings > General > Reset > Erase All Content & Settings
    What is it you are worried about losing that isn't already on your current device?

Maybe you are looking for