Show or Count info depending on the month on SharePoint

I have a a custom list that contain several columns with data (numbers). One of the column cotains the Month Name in which the data was entered and another hiden column with the Month Number. In this list I have another column named Pending Cases. his clumn
only show the informaion of the previous months and nothing else. For example if you had 2 pending cases in November and 2 in December. When creating a report in January, only what was pendng n December maters, because older than that have been solved, or
are not pending anymore.
In order to show the data I created a web part showing a table. This table was working beautifully until January. And this s why:
In order to filter the data the way I wanted to I created a variable called PMonth (for Previous month), which would get the month from the current date:
<xsl:variable name="PMonth" select="(ddwrt:FormatDateTime(string($Today),1033,'MM') -1)"></xsl:variable>
Then I created a Total column where I would show only the data from the previous month:
<xsl:value-of select="sum($Rows[@Month_Number= $PMonth]/@Pending_x0020_Previous_x0020_Yea)"/>
This would compare the Month_Number column with PMonth, and only would show when True.
Again, this worked perfectly until now that January is month numnber "1". When I get the current month using ddwrt:FormatDateTime... as previously shown for PMonth, I get a negative number or "zero" when the current month is January
or February; therefore sum($Rows[@Month_Number= $PMonth]/@Pending_x0020_Previous_x0020_Yea)" would never happen the first months of the year, because it is out of the scope (1 - 12). I been trying to find a way to solve this issue, but no luck so ar.
I would appfreciate any suggestion using XSLT or jQuery. Thanks in advance.
EM

hi
the issue is caused by month numbering
create a new calculaated column in your list, which will be used in your forumla
this calulcated column =
 12 if [Month Number]=1, otherwise
=[Month Number]-1
Romeo Donca, Orange Romania (MCSE, MCITP, CCNA) Please Mark As Answer if my post solves your problem or Vote As Helpful if the post has been helpful for you.

Similar Messages

  • Creation of new key figure at report level depending on the month range

    Dear All,
    I have a requirment where user wants to see the dollar values for the Amount key figure. Data is stored in the INR value in the cube.
    Exchange rate values keep on changing depending upon the quarter. For all four quarters we have four different exchange rate.
    Now system has to identify the applicable exchange rate and show a new column with the USD value just beside the INR values column.
    How best we can achieve this.
    Thanks & Rgds,
    Anup

    Hi
    You can have currency translation at query level for achieving this.
    https://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/600157ec-44e5-2b10-abb0-dc9d06ba6c2f&overridelayout=true
    Translation in Query
    Regards
    Ravi
    Edited by: Ravi Naalla on Aug 17, 2009 11:56 AM

  • ICal has stopped showing events for Sundays only in the month view.

    iCal has stopped allowing events to be entered or viewed on Sundays from the Month view.  If I double click on a date on the month view, for a Sunday, nothing happens on the screen but if I go to the day view there is a default New Event on the day. 
    If I enter an event from the day view it does not appear on the Sunday in the month view.
    On previous Sundays where events already exist I can add a new event from the month view.  If I add an event using google calendar from Chrome it appears on the Sunday and then I can add event from the month view.
    This just recently started happening.
    I am using Mavericks 10.9.1 with iCal Version 7.0 (1835.1).

    dutchlab,
    Quit Calendar, then try removing the com.apple.iCal.plist file from your Macintosh HD/Users/yourusername/Library/Preferences Folder. To find that folder, use Finder>Go Menu>Depress the "Option" key>Library, and open the Preferences Folder. Drag the com.apple.iCal.plist file to your desktop, and log out/in or restart and check Calendar for functionality.

  • Master Data is not showing for 0Customer info obeject in the portal

    Hi Experts,
    I'm facing an issue with 0CUSTOMER Info object. When I tried to execute the query from Query designer(BI 7.0) it is not showing all the customers  in filter for 0CUSTOMER in WEB  but it is showing all values for other characteristics(i.e 0MATERIAL).
    I tried to execute same query in Bex Analyser and RSRT but it is showing all  the customers list in filter for 0CUSTOMER. I have this problem in WEB only
    Please suggest me why 0CUSTOMER is not showing all the values in WEB.
    Thanks,
    Jaypal

    in WEB, all values wont be displayed in single page if the list is too long, There will be a button to navigate to the next page and select. Please check that.

  • Workflow menu option not showing up in edit form or the ribbon in SharePoint 2010 list

    In a SharePoint 2010 list I created a workflow (in SPD)  and published, but in the Edit Item form, there is no Workflow option. In the ribbon, the "Workflow" button is greyed out.
    But I see this option in other lists.  Where is the setting I can get this workflow option show up in menu?
    Thanks in advance

    Hi,
    Glad to hear your issue solved and thanks for your posting!
    Best Regards,
    Eric
    TechNet Community Support
    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]

  • HT2513 How do I get the location to print in the monthly view?

    Is there a way to get the location to show as well as print in the monthly view?  The events that I'm concerned about are 'all day' events in a separate calendar.

    Rich media in PDF isn't designed for print workflows so you cannot control what appears - you should just get a bitmap 'screenshot' of whatever the viewport was displaying at the time.

  • Name of the Month not showing correctly in calendar

    I m facing a strange problem with the calendar, on the home screen calendar icon date & day is showing correct but when i view the full month calendar then its not showing the right month --- it is showing all the days of the March 1st to 31st correct but on the TOP in place of month it is showing February 2008 instead of March 2008. How can Feb has 31 days. I hv checked all the other settings.
    PLS HELP ME.

    Here are a couple of articles from the apple support website that might help out.
    http://docs.info.apple.com/article.html?artnum=305740
    http://docs.info.apple.com/article.html?artnum=305744

  • HT5624 Why in my email ( the one on my ipod5 that I use with my apple ID) when I get emails about my use of my apple ID to use a service in the from field it has my fathers name and when I click on it it shows his contact info ????

    Why in my email ( the one on my ipod5 that I use with my apple ID) when I get emails about my use of my apple ID to use a service in the from field it has my fathers name and when I click on it it shows his contact info ???? I also set up my apple ID with a new email account and also I signed up for iCloud but used the same apple I'd email and password but it gave me a I cloud email! I did activate the favorites in my email . Noticed the from field has my fathers name and contact and it is a notification about me using my apple ID to sign in to FaceTime! Something is messed up, not sure how or why???

    i didn't read a lot of your 2nd paragraph, but it seems like the password is the issue, right?
    do a true clean install
    reboot your machine and hold down command+option+r, you should see a spinning globe - if you don't see the globe or anything that reads internet recovery, shut down and try again
    at menu, chose disk utility and once there, find your HD on the left side, select the physical name and erase it as mac journaled
    exit disk utlity
    at menu, choose install OSX
    this time, when it asks for a password just hit continue, it will let you complete without a password
    you should be able to get into your laptop, now figure out what password you'll be able to use with your kb issue

  • Is there a way to default the monthly calendar display so that the current day always shows on top?

    Is there a way to default the monthly calendar display
    so that the current day always shows on top? ie, I want to always be able to see what's in the future 3-4 weeks, not what's in the past 3-4 weeks. The default monthly display is archaic--only allows you to see through the last day of the month. Suddenly today
    is Oct. 30th, and I have a ton of projects lined up in November, but because I haven't been scrolling down every day, I haven't been aware of them every day. I realize there are other tools in Microsoft to help me stay on task, such as reminders and such,
    but it would be helpful if I could always have the current day display on top of the monthly view so I can quickly scan what's coming up in the next few weeks. 

    Thank you!
    Right, I already have it in Month view. My question is a little more specific--I'd like for the current day to always display at the top. For example, today is Oct. 31st, so the current day is at the bottom of the calendar since it is the last day of the month.
    I can view everything in October that I've already completed. What I can't see are the future weeks because we haven't hit November yet. I'd like for the current day to always display at the top of my calendar so I can always see what's coming in the following
    three - four weeks (whether they're a part of that month or not). I've been to other forums trying to find the answer, and have come across the same exact question from frustrated users--but there seemed to be no solution. So I'm posing the question myself
    in this forum. Do you know if this is possible? What I found from other forums is that Outlook defaults to a physical 'desk' type calendar format--so just as I'd use a paper calendar at my desk, I wouldn't be able to see the following weeks unless I either
    flip the page to that month or I come to the first day of the next month, thereby tearing the the old month off and now only able to see the current month. That format is just so...paper...and archaic! Essentially I want the calendars to loop so it doesn't
    even really matter what month it is--I just always want to see what lies ahead without having to scroll down. With our being in the Technology Age, I'd assume this is a logical expectation, but we may be stuck with the replica version of the paper-desk-calendar
    format until Outlook programmers add this Technology Age feature in newer versions.  
    See, this month kind of messed me up because I have so many projects for November that start tomorrow and next week, but I haven't seen them until this week. I would have been better quipped--at least expecting them--had I been able to see all of those projects
    since last week or the week prior.  
    If there is no solution to this answer, would you know how I can contact Outlook to provide feedback? I'm guessing a newer version is on its way...
    Thanks again in advance!

  • HT2513 my iCal shows events in the "month" view but not in the "week" view? why is that?

    my iCal shows events in the "month" view but not in the "week" view? why is that? doesnt sync automatically all the time only sometimes

    my iCal shows events in the "month" view but not in the "week" view? why is that? doesnt sync automatically all the time only sometimes

  • How do you make multi day events show as such in iCal? It only shows the first day of the event in the monthly overview.

    I'd like to be able to view these events from the monthly and yearly overviews.

    I have this same problem with my iPad and iPhone. I don't want all of my events to be set as all-day events, as some have different start or finish times. Why (Apple) do you think that when we set an event that spans over midnight, but does not last all day, we don't want to see it when we check our month view or list view??
    Come on Apple. We want to see all our events, shown on every day that they feature. You must be causing some people real problems when they glance at their month view and end up double booking an appointment because it doesn't show.

  • How do you show time on the month view of Calendar

    My calendar events, before Maverick, showed the time on the month calendar view. Now I can only access time if I click on each individual event or the day. Is there any way to change the calendar view to include the time?

    Thanks for replying. You helped me figure out the answer. My calendar needed to be stretched larger for the dates to appear

  • Do not show dots for 'free' events in the calendar month view

    I wish I could.... not show dots for 'free' events in the calendar month view. For an overview of when I have hard-scheduled events in the calendar it's pretty tedious and slow to go day -by day, and other views... Instead the dot  in the month view... - why does it show even "free" events? Any ideas, tips?
    Thanks!

    Unfortunately there is no option to disable the dots.
    <Edited by Host>

  • When I download a movie from iTunes the cover art disappears. I try get info and add the art, it doesn't show up. So it's just gray. It opens and plays fine. Apple can't figure it out. It's an nas drive. When I use a firewire drive I get the art

    When I download movies from iTunes to my NAS drive, I don't get the cover art. It shows up while its downloading, but when it's finish it disappears. If it has an iTunes extra the cover art is there. I tried get info and add the cover art, it never shows. Regardless of how I add it. Funny thing is, if I download the same movie to my external firewire drive, no problem its there. I've called Apple with no success. I've even tried copying the movie with the art from the firewire drive to replace the file on then NAS drive I still loose the movie cover art. I also tried several times to re download it, no luck. Any ideas? I'm out of ideas.

    Do you have any videos/movies in the video app?
    In iTunes if you right click on the video and select Get Info and go to the Option tap what Media Type is shown?

  • Count of records based on the month.

    I have a view, which loads data of logs for all the process that run daily in the user. I want to see how many number of records it stored in the month of February. So here is the query I have written. But I keep on getting this errors.
    ORA-01722: invalid number error or If I use the TO_DATE function then it is giving ORA-01858: a non-numeric character was found where a numeric was expected.
    SELECT proc_name , COUNT(*),start_dt
    FROM vw_fvo_proc_log
    WHERE TO_CHAR('start_dt','MMYYYY') = '022010'
    GROUP BY proc_name,start_dt;Here is the definition of the view.
    CREATE OR REPLACE FORCE VIEW vw_fvo_proc_log (
       proc_name,
       step_desc,
       start_dt,
       exec_time,
       rec_count,
       osuser,
       terminal
    AS
       SELECT proc_name,
              step_desc,
              start_dt,
              (CASE EXTRACT (HOUR FROM exec_time)
                  WHEN 0 THEN NULL
                  ELSE EXTRACT (HOUR FROM exec_time) || ' Hr '
               END)
              || (CASE EXTRACT (MINUTE FROM exec_time)
                     WHEN 0 THEN NULL
                     ELSE EXTRACT (MINUTE FROM exec_time) || ' Min '
                  END)
              || EXTRACT (SECOND FROM exec_time)
              || ' Sec'
                 AS exec_time,
              rec_count,
              osuser,
              terminal
       FROM (SELECT proc_name,
                    step_desc,
                    start_dt,
                    CAST ( ( (end_dt - start_dt) DAY TO SECOND) AS INTERVAL DAY TO SECOND
                       AS exec_time,
                    (CASE rec_count WHEN -1 THEN NULL ELSE rec_count END)
                       AS rec_count,
                    osuser,
                    terminal
             FROM fvo_proc_log
             ORDER BY logid DESC)
    /Exec_time will give the execution time of the each process (for each step of the process) ex: 16 Hr 58 Min 58 Sec, I am curious if I can be able to calculate the total time taken by the particular process.
    Thanks for the help.

    Yes. But you will need to be more specific as to what you mean by "execution time." Run time? CPU time? etc.

Maybe you are looking for

  • How do I restore QT Pro?

    I just finished re-installing my system and realized that I did not save my QT Pro information, but it has been backed up in my time machine backups. So, my question is how can I go into my backups and bring QT back to the way it was prior to my re-i

  • Secondary cost element report

    Hi experts, i just looking for secondary cost element reports ? regards, Sanju M S

  • How will i configure third party sales order

    pls tell me how will i configure for third party sales order

  • Pricing - Mandatory based on logic

    Hi Guys Is it possible to make any condition mandatory in pricing proceidure based on a logic? For eg:  Condition Type K004 has to be mandatory only when Sales Organisation = 1000 and Distribution Channel = 12. Thanks in Advance. Regards Uma

  • Problem when opening "Mail"

    Dear members of the Apple Community, After transferring my files and my profile on my new Macbook pro, I keep encountering a problem when opening "Mail". Each time I try, the app asks me to choose a mail account to add, but I already added the ones I