Calculation of days of company using TimestampDiff in OBIEE

Hi Experts,

I have a requirement to calculate working days and I use a simple statement as shown below. I need calculatethe difference between two days when 'Day of the week indicator' = 'Y' and holiday status flag = 'n'. The statement here calculates the difference between two days and I get the results displayed for each time the condition ('Day of the week indicator' = 'Y' and status of Holiday indicator = 'n') is true. Ideally, I need to pass this filter inside the TimeStampDiff function to retrieve the correct value (because consider the days of week and holidays when calculating difference in date). Please let me know on how we can move the filters inside the TimestampDiff function or if there is another way to achieve this.

BOX WHEN "CalPERS BI." "" The RPD Date2. "' Day of the week indicator ' = 'Y' and 'CalPERS BI." "" The RPD Date2. "" Indicator state holiday "= ' don't

THEN TimeStampDiff (SQL_TSI_DAY, "CalPERS BI". "" The RPD Date2. "" Calendar date ","CalPERS BI. " "' Date4 RPD. ("" Calendar Date ") END

Thank you.

Rick.

Check this http://www.cool-bi.com/Tweaks/DateExcludingWeekends.php

Try this

TimeStampDiff (SQL_TSI_DAY,

BOX WHEN "CalPERS BI." "" The RPD Date2. "' Day of the week indicator ' = 'Y' and 'CalPERS BI." "" The RPD Date2. "" Indicator state holiday "= ' don't

THEN "CalPERS BI '." The RPD Date2. "" Calendar Date "end.

BOX WHEN "CalPERS BI." "" The RPD Date2. "' Day of the week indicator ' = 'Y' and 'CalPERS BI." "" The RPD Date2. "" Indicator state holiday "= ' don't

THEN

"CalPERS BI '." Date4 RPD. ("" Calendar Date "END)

Tags: Business Intelligence

Similar Questions

  • Given that I have updated to IOS 9.2 my Ipad 2 Air is discharge the battery in 12 to 14 hours, even without any use. Before the update, after a day of average use of the battery was still 70-75%. How can I reinstall the IO 9.1?

    Given that I have updated to IOS 9.2 my Ipad 2 Air is discharge the battery in 12 to 14 hours, even without any use. Before the update, after a day of average use of the battery was still 70-75%. How can I reinstall the IO 9.1?

    Hello

    The best way to save battery life is to go into the settings and turn off Apps Refresh

    I now get 3 / 4 hours of battery life more.

    You cannot return to a previous ios 9.1

    See you soon

    Brian

    PS

    If you still have a problem iCloud backup now

    Then restore settings to get rid of any bugs.

  • How can I dob in a company using cracked MS software?

    How can I dob in a company using cracked MS software?

    See you soon!

    If you want people to report or company who use Microsoft Software crack, you might start:

    https://www.Microsoft.com/en-us/howtotell/CFR/report.aspx

    http://www.BSA.org/

  • Calculation of age using TimeStampDiff problems

    Hi, I'm running a strange problem. 'âge' is not an attribute stored in our data warehouse - but is "Date of birth".

    I try so to dynamically calculate age based on the difference between the date of birth and whatever "date statement" the user chooses. In the business layer, I defined the age as (note that field date_key on the date dimension is actually a DATE field, not the surrogate key):

    Try #1: TimeStampDiff (TSI_SQL_YEAR, birth_date, dim_date.date_key)
    Try #2: TimeStampDiff (TSI_SQL_MONTH, birth_date, dim_date.date_key) / 12
    Try #3: Truncate (TimeStampDiff (TSI_SQL_MONTH, birth_date, dim_date.date_key) / 12, 0)

    The problem I encounter is that, when written OBIEE the SQL in the Oracle database, instead of translating the TimeStampDiff function to use Oracle "months_between", it uses ROUND (months_between), like this:

    ROUND (MONTHS_BETWEEN (T48594. DIM_DATE_KEY, T48615. (BIRTH_DATE) / 12)

    And the problem is, when the flare, he pipes the calculation of age. For example, I get the following for an employee with a date of birth 20 October 1967:

    RPT Date Birthdate age
    Jan 2009 10/20/1967 41
    Feb 2009 10/20/1967 41
    Mar 2009 10/20/1967 41
    Apr 2009 10/20/1967 41
    Apr 2009 10/20/1967 42
    May 2009 10/20/1967 42
    Jun 2009 10/20/1967 42
    Jul 2009 10/20/1967 42
    Aug 2009 10/20/1967 42
    Sep 2009 10/20/1967 42
    Oct 2009 10/20/1967 42
    Nov 2009 10/20/1967 42
    Dec 2009 10/20/1967 42

    As you can see, on 20 April, the age increased from 41 to 42 years. April 20 is exactly 6 months before date of actual birth of 20 October (so the problem with the ROUND function).

    I need to somehow "force" OBIEE use TRUNC (months_between), not ROUND (months_between). Well, to tell you the truth, not sure at all why he puts ROUND here... If I wanted the rounded number, I would add this feature in muself. Other creating a view in the physical layer to support this, is possible to do what I'm trying to do it directly in the business layer?

    Thanks in advance!
    Scott

    If so...

    use the functions of database directly with function evaluate in OBIEE

  • Is it better to leave my computer all the time, it starts once a day... or restart 2 - 3 times a day when I use it?

    I wonder if that makes a difference in the wear and tear on the computer the frequency at which it turned itself off and then restarted.

    Why do you want to start it 2 - 3 times a day?
    Do not use it, you can put in stand-by or hibernation!

    Unless you absolutely must re-boot, you can use alternatives.

  • BEFVP41 internet connection stops at least once a day (do not use DSL)

    Recently started using this router and I noticed that at least once a day the internet connection is dropped and will not bounce back on until I update any random setting on the router. It's getting very annoying frickin since I work from home. I have a static IP via fiber cable directly to the House so no modem is in the way.

    I have the Firmware update but apparently according to someone on this page:

    http://www.Newegg.com/product/ProductReview.aspx?item=N82E16833124003

    "It stopped working completely after a month. After a conversationwith a gentleman very polite to Linksys, we determined that this router comes with (v1.02.00) version thefirmware means forwireless routers! Latest firmware for the router is actually v1.01.04. »

    "Much work most of the time. After using it about 2 weeks, he starteddropping the Internet and required a reboot in order toreconnect to the network. After using it about 3 months, it would be notrespond to a ping or a connection attempt, but continued to functionnormally otherwise. Currently, it can not be configured withoutrebooting and he gives a ping answer about 10% of the time. »

    Same thing is happening to me so I wonder if I have a defective router or if it is that Linksys has forgotten something with the firmware. I have the last 1.02.00 on router v2.1.

    Anyone know anything on this subject?

    Try to reflash the firmware once more.

  • Loss of connection network several times a day while actively using internet. Will not stop after that.

    I read a lot of posts on the Vista network connections problems when changing modes of consumption, or when the wireless adapter is inactive. None of them apply to me because I lose my network connection when I have my laptop plugged in and I'm actively using the internet (for example, watch movies online). After trying "diagnose and repair" options, nothing seems to work. The only way I found to get internet again is to restart my computer. What makes it still more difficult, is that after that happens, my computer doesn't shut down normally. It freezes at the blue screen that says "shutting down". Whenever this problem with the network connection happens I am forced to make a difficult start (hold the power button until the power is off) if I want to use the internet again. It's only happened for about a month, and it's happened before and after that I installed Service Pack 2. I don't remember installing any software a month ago with the exception of Windows updates that I can't uninstall (the button uninstall is hidden for some updates). Any help I can get would be much appreciated because it is very frustrating to have hard to start my laptop several times a day in order to continue to work on this.

    -Sam Goodrich

    Hi Sam

    I regret that no one answered earlier.

    Since you don't have physical access to the router, this will make the diagnosis very difficult.  And, given that this problem is intermittent, once again, very hard to track down what is causing the problem.  You can very well just to lose the intensity of the signal.

    I mentioned the switch on the laptop because if anything goes wrong, who "could" cause this problem, and given that the laptop is no longer under warranty, you will not be able to have your factory repair it (for free of course).

    I don't see what other suggestions from the Forum can give you.  Once again, with this problem being sparadic (intermittent) and since you share Internet access with someone else and do not have physical access to the router for troubleshooting purposes, my hands are basically related...
    Ken
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • OfficeJet 6600 will not respond after several days of not used beirng

    After that the printer has not been used for long periods (days, even a few weeks), the wifi light is on, but apart from that the printer doesn't respond to touch screen. The only solution I found is to unplug the printer & it works when it is plugged in. It is not easy, the way in which the printer is sitting on a table to do this. Is there another way to 'better' to wake up?

    Hey, three things to check.

    (1) is the firmware updated?

    (2) IP is static?

    (3) is 6600 directly connected to the wall outlet?

  • How do you do for a company using Webfonts of Muse of brand?

    I'm still a bit confused by how Adobe integrates their products, I always feel like they have begun to design independently of each other without taking into account how well designers usually use them. So, I'm a brand enterprise and trying to figure out how those of you who use Muse to web design choose your fonts so that the company will have a consistent look print and on the web? I feel like it very little shared typographically speaking between webfonts of Muse and I would use in indesign or illustrator for the creation of the logo of the police. Obviously, I like to keep this relatively consistent, but for those of you who are actually the brand image, do you just start by muse and try and choose a font that works there and then return to print design, or you're just printing and logo together and then just pick a general font like Helvetica to work for the web?

    This isn't the site I used to use, but it is very similar.

    Combinations of Baskerville fonts

    One of the suggested free fonts is Proxima Nova, which is a web font. In general, I'm looking for the police that I would like to congratulate and when I find a pairing that I think might work, I seek to typekit.com and see if she is available as a web font. There are other similar sites out there that you may want to explore. Hope that helps

  • Field calculated MDB a max date using rank

    Hello

    I need to get a maximum date within projects, and the date max must be a computed column. In the database there is the query I would use, how can I implement this in BMM, need help please, let me know if there is another way?

    Select a.commitment_date from
    (SELECT project, stage_id, commitment_date,
    DENSE_RANK() over (PARTITION BY project ORDER BY commitment_date desc) as rank
    of prod_detail) a
    Where rank = 1 a.project_id group;

    Thanks for your time and your help.

    Hi ssk.

    Your query in the DB online help, you can do 1 thing directly use this query in the physical layer and go to the-> new physical table and choose table type-> select and write SQL inside and paste this query it and joins appropriate to this table so he realized the extraction you want. So draw from this table to also be layer MDB.

    (GOLD)
    Take a new calculated column in the layer of MDB write it as max (commitment_date) and check the query SQL generated by BI server when you use this column in your application, by default, need to add group by clause adding columns to it.
    If you want to change the group by according to your requirement, and then go to the advance in the response criteria, find you the section group you specify a.project_id and check the results.

    Award points and close your previous message also @ssk field calculated MDB in the fact Table?

    See you soon,.
    KK

  • Multipoint video chat in the company using RTMFP network

    Hello

    I want to create an application of videoconference in a company without cirrus/stratus network, but using RTMFP.

    I'm not sure but I think there are two possibilities:

    1: native ip Multicast (but is it also possible for a video/audio?)

    2: licenses Adobe Flash Media Interactive Server 4 (it doesn't replace the cirrus service?)

    Can someone help me to find the best solution?

    Thank you

    Joerg

    on a local network, you can use RTMFP groups in "Server" mode by connecting to the URI RTMFP "rtmfp.  in this mode, you must use LAN IP multicast to gather peers in a group.  You can then use patterns, such as P2P multicast and group validation, data flow between the peers and text chat and stuff.

    Examples of the use of the manual without a server in my MAX 2010 laboratory equipment:

    http://2010.Max.Adobe.com/schedule/by-session/#filter_speaker=036c28fe-ae9f-4907-b880-47af677168b9

  • calculation no days between 2 dates

    Hello

    "I want to calculate the number of days between the two dates for my application based on" leave system "and want to be typed automatically in the P2_TOTAL_DAYS text box.

    So I have an event like onChange = "javascript:Calc('P2_END_DATE','P2_START_DATE')" in the form of P2_END_DATE element attributes. "

    And in the header of the page, I wrote javascript code.

    Now, in the 'Calc' function I want to have the time in milliseconds for the two arguments, as well as the difference of these two times, I can get the number of days between the two. Now I m trying the getTime() function, but I m still fails.

    Can anyone help with this.

    Thank you.

    Hello

    In your code:
    var date1_ms = ($x (pendDate.getTime ()) .value);
    should be
    var date1_ms is $x (pendDate).value.getTime ();. or var date1_ms = $v (pendDate) .getTime ();

    In my code here as an error:
    $s ("P2_TOTAL_DAYS") .value = ((endDate.getTime () - startDate.getTime (()) / 1000 * 60 * 60 * 24);
    should be
    $s ("P2_TOTAL_DAYS", (endDate.getTime () - startDate.getTime (()) / 1000 * 60 * 60 * 24);

    But you can also use the code Andy, which is more flexible because you can use/define your own format mask,.

    Greetings,
    Roel

    http://roelhartman.blogspot.com/
    http://www.bloggingaboutoracle.org/
    http://www.Logica.com/

  • How can ALBUM of the DAY E - I use a wlmp

    I would like to know how I can use a file on a journe wlmp e book please help
    I would like to make a presentation of the different houses.

    So I made maps in windows 7 media movie maker and so I have beautiful slideshows of all the houses but e toshiba journe album he does not put on the menuscreen so I can't show

    What to do? Please help me
    Thank you guys

    Hello

    I found this page Toshiba JOURN. E ALBUM
    http://www.Toshiba-multimedia.com/EU/Journe-tablets-photo-frames/album/

    The specification says that this file format is supported:

    + Photos: JPEG, BMP, Camera Raw +.
    + Audio: MP3 +.
    + Video: M-JPEG, MPEG-1 /-2 /-4, Xvid +.

    There is nothing on the wlmp file format and so I guess the other file formats are supprted.

  • How many emails per day can send using apple mail, I can buy more

    How many emails a day apple allows to send from their mail server in apple mail?

    If there is a limit can be increased by purchasing permission to send more than the daily amount that they allow with apple mail?

    1 200.

    2 No.

    (138150)

  • Simple Script Execution: Days and only using 15% of the CPU power

    Dear community,

    I have a data file (.tdm) with 17 channels of waveform point each containing 13742499 data. I want to delete all the data points that are not actual load points. I have build a canal ("LoadTrigger") that is a trigger for points of interest. With the following script, I tried to erase the im not interested datapoints:

    Dim RowCount

    Number of lines = 1 to GlobalChnLength

    ChnVal if (RowCount, "/ LoadTrigger") = 0 THEN

    Call the DataBLDel ("1-17 ', RowCount, 1" ")

    End If

    Next

    The script is now running for more than 20 hours with no result. Can someone please tell me if I am wrong in my script, or if there is a way to make it faster?

    In addition, I wonder why DIADEM uses no more than my cpu power? As you can see in the photo attached DIADEM mainly use a carrot and never more than 15% of the CPU.

    Best regards and hoping answers of construcitve!

    If you try to delete rows based on conditions, you can use code like this:

    Option Explicit
    CreateExample

    "Make sure that the correct group is active.
    data. Root.ChannelGroups (1). Activate
    ' chncalculate allows you to set values that match a NOVALUE condition
    Call chncalculate ("Ch (1) = Ch (1) + CTNV (0 = Ch (1))")
    'Delete the lines that contain a NOVALUE in channels '.
    Call ChnNovHandle ("[1] / [1]", "" [1] / [2]'-' [1] / [3]'","Delete","XY", 1,0, 0)

    Sub CreateExample()
    data. Root.Clear
    Dim g: g = given game. Root.ChannelGroups.Add ("group")
    Dim c1: set c1 = g.Channels.Add ("c1", DataTypeFloat64)
    Dim c2: set c2 = g.Channels.Add ("c2", DataTypeFloat64)
    Dim c3: set c3 = g.Channels.Add ("c3", DataTypeFloat64)
    I have Sun: for i = 1 to 100
    C1 (i) = I mod 2
    C2 (i) = I have
    C3 (i) = i * 0.00001
    Next
    EndSub

    that will remove all lines that contain a 0 in the first round.

    will be converted to

Maybe you are looking for

  • Wayne Kerr 7720 Impulse Tester (serial interface) driver needed

    Anyone know where I can find a driver of Wayne Kerr 7720 Impulse Tester LabVIEW. The tester has a RS232 interface. Also useful would be a good source to learn how to write such a series driver where I can't find one. Thank you.

  • Outlook Express - messages do not appear in the body of the e-mail.

    Outlook Express - messages do not appear in the body of the e-mail. Show only the like ATT or txt or HTML. I always have to click on the attachment to read an email. All messages in the Inbox of reception and sent items also have ATT attachment or tx

  • How to move to Windows 10 without knowing the password admin for Windows 7?

    Try to upgrade to Windows 10 but the upgrade program requires the Windows 7 Administrator password.  He had not used in years and forgot it.  Kim Komando recommended the implementation of user account separated without administrative privileges to se

  • Request to restart problem!

    Scenario is,I have a VO dropped as ADF FORM with Navigation buttons, to end of query rerun that I dropped an Adf button on the page that performs a function that is exposed on the Client Interface of AppModule.below the code belongs to ADF buttonPubl

  • Missing or incorrect files and javascrip exception error loading site

    Visit my Web site, you get this first.Then you get this and the site does not appear after you click ok.Here is the error in the source code in the Chrome developer tools. Can anyone help?Any help/advice greatly appreciated.