To count the elements in this Source

hi all,
I have a Source created by:
Source s = m1.join(m2).join(m3).join(d1).join(d2);
m1, m2, m3: MdmMeasure of the same Cube C1
d1, d2: MdmPrimaryDimension of the same Cube C1
I want to count the elements in this Source that have values so I used:
s.count()
I want to know the result of count() is the number of lines of m1 or m2 or m3?
Whith the same source like this, can I count the elements of m2?? If it's possible, show me how to do it please!
Always with the same source, is it possible to know which measure: m1 or m2 or m3 have the most elements not null?
I can count the elements of each measure then compare its together but in my exercice, I have 20 measures so I find a method that avoid the most request and comparison!
Thanks for your reply!

Guys - Thanks for the quick response
Bill - I think you are recommending the approach I had in the submitted code.
David - the whole point is that I want to use the pipeline, not the Path argument, and I had no luck with your suggestion, which I took as:
        Get-ChildItem $from -Recurse  |
            Where-Object {(New-TimeSpan -Start  $_.LastWriteTime -End $cutoff).TotalHours -le 0} |
            ForEach-Object {Copy-Item -Path $_ -Destination {Join-Path $to $_.FullName.Substring($from.length)}; $fileCount++}
However, all this did make me go read more documentation, and there is a -PassThru argument to Copy-Item which creates pipeline output after the copy.  Specifically:
        $fileCount=0
        Get-ChildItem $from -Recurse  |
            Where-Object {(New-TimeSpan -Start  $_.LastWriteTime -End $cutoff).TotalHours -le 0} |
            Copy-Item -Destination {Join-Path $to $_.FullName.Substring($from.length)} -PassThru |
            ForEach-Object {$fileCount++}
        Write-Host ("Copied {0} files/folders successfully at {1}" -f $fileCount, $(Get-Date))
Thanks again
JonW
JonW

Similar Messages

  • How to count the elements in a Source whith method count() ?

    hi all,
    I have a Source created by:
    Source s = m1.join(m2).join(m3).join(d1).join(d2);
    m1, m2, m3: MdmMeasure of the same Cube C1
    d1, d2: MdmPrimaryDimension of the same Cube C1
    I want to count the elements in this Source that have values so I used:
    s.count()
    I want to know the result of count() is the number of lines of m1 or m2 or m3?
    Whith the same source like this, can I count the elements of m2?? If it's possible, show me how to do it please!
    Always with the same source, is it possible to know which measure: m1 or m2 or m3 have the most elements not null?
    I can count the elements of each measure then compare its together but in my exercice, I have 20 measures so I find a method that avoid the most request and comparison!
    Thanks for your reply!

    hi all,
    I have a Source created by:
    Source s = m1.join(m2).join(m3).join(d1).join(d2);
    m1, m2, m3: MdmMeasure of the same Cube C1
    d1, d2: MdmPrimaryDimension of the same Cube C1
    I want to count the elements in this Source that have values so I used:
    s.count()
    I want to know the result of count() is the number of lines of m1 or m2 or m3?
    Whith the same source like this, can I count the elements of m2?? If it's possible, show me how to do it please!
    Always with the same source, is it possible to know which measure: m1 or m2 or m3 have the most elements not null?
    I can count the elements of each measure then compare its together but in my exercice, I have 20 measures so I find a method that avoid the most request and comparison!
    Thanks for your reply!

  • How to count the elements with values in a Source?

    I have 2 measures which needs the same dimensions as inputs. So i use "Source.join()" to fill the inputs of both the measures like this:
    Source result = m1.join(m2).join(d1).join(d2);
    m1, m2: the "Source"s of the "MdmMeasure"s
    d1, d2: the "Source"s of the "MdmPrimaryDimension"s
    So before retrieving the results, i want to know how many lines i'm gonna have:
    Source resultCount = result.count();
    Here is my problem : the 2 measures have "NA"(1) but not the same "line" of data, and count returns the number of lines with data for the first measure (m1).
    I would like to have the number of lines which have data in at least 1 measure.
    example:
    | d1 | d2 | m1 | m2 |
    | a | b | 1 | 2 |
    | b | c | NA | 2 |
    | b | c | 4 | NA |
    | b | c | NA | NA |
    right now, i get 2, but i would like to get 3
    Can you help me please?
    NA(1) : when ValueCursor.hasCurrentValue() return false.
    Source(2) : http://oraclesvca2.oracle.com/docs/cd/B14117_01/olap.101/b10994/oracle/olapi/data/source/Source.html

    You have to put table name in Capital letters
    Like
    SELECT COUNT(1)
      FROM user_tab_columns
    WHERE table_name = 'EMP';
    or
    SELECT COUNT(1)
      FROM user_tab_columns
    WHERE table_name = UPPER('Emp');Regards
    Arun

  • I want to count the elements in the pipeline and also process them

    The following script works, but only because I save the pipeline contents in a variable.  I would like to not have to save it - see below. The commented section is my most recent failure. (And BTW I know the script has nothing to do with ZIP: that's
    the next step.
    function ZipUpModified {
        param ([string] $from, [string]$to, [datetime]$cutOff)
        try
            Write-Host ("Copying {0} modified on or after {1} to {2} in execution at {3}" -f $from, $cutOff.toString(), $to, $(Get-Date))
            if (-not (Test-Path -Path $from)) {Throw "Source folder $from does not exist"}
            if (Test-Path -Path $to) {Throw "Target folder $to already exists"}
    # I would like to substitute the next 5 lines for the following 4; but I cannot seem to get the pipeline to reach the Copy_Item
    #       $fileCount=0
    #        Get-ChildItem $from -Recurse  |
    #            Where-Object {(New-TimeSpan -Start  $_.LastWriteTime -End $cutoff).TotalHours -le 0} |
    #            ForEach-Object {Copy-Item -Destination {Join-Path $to $_.FullName.Substring($from.length)}; $fileCount++; }
    #        Write-Host ("Copied {0} files/folders successfully at {1}" -f $fileCount, $(Get-Date))
            $filelist=Get-ChildItem $from -Recurse  |
                Where-Object {(New-TimeSpan -Start  $_.LastWriteTime -End $cutoff).TotalHours -le 0}
            $filelist | Copy-Item -Destination {Join-Path $to $_.FullName.Substring($from.length)}
            Write-Host ("Copied {0} files/folders successfully at {1}" -f $filelist.count, $(Get-Date))
        catch
            Write-Host $($_.Exception.ToString() -replace ".*: ")
            Write-Host "so we are stopping..."
        finally
            $IgnoreThis = Read-Host "hit OK or Enter"
    ### Main
    $cutOff= (Read-Host 'Enter date of most recent backup (mm/dd/yyyy):') | Get-Date
    ZipUpModified "C:\Users\Jonathan\Desktop\Test_BU\SRC" "C:\Users\Jonathan\Desktop\Test_BU\TGT" $cutOff
    ## two more calls to ZipUpModified

    Guys - Thanks for the quick response
    Bill - I think you are recommending the approach I had in the submitted code.
    David - the whole point is that I want to use the pipeline, not the Path argument, and I had no luck with your suggestion, which I took as:
            Get-ChildItem $from -Recurse  |
                Where-Object {(New-TimeSpan -Start  $_.LastWriteTime -End $cutoff).TotalHours -le 0} |
                ForEach-Object {Copy-Item -Path $_ -Destination {Join-Path $to $_.FullName.Substring($from.length)}; $fileCount++}
    However, all this did make me go read more documentation, and there is a -PassThru argument to Copy-Item which creates pipeline output after the copy.  Specifically:
            $fileCount=0
            Get-ChildItem $from -Recurse  |
                Where-Object {(New-TimeSpan -Start  $_.LastWriteTime -End $cutoff).TotalHours -le 0} |
                Copy-Item -Destination {Join-Path $to $_.FullName.Substring($from.length)} -PassThru |
                ForEach-Object {$fileCount++}
            Write-Host ("Copied {0} files/folders successfully at {1}" -f $fileCount, $(Get-Date))
    Thanks again
    JonW
    JonW

  • Xsl count the elements with value x

    Hello,
    I'm trying to set up a transformation command in a stylesheet to get the number of nodes in a xml file that have a certain value. For the following xml source
    <root>
    <a>OK</a>
    <a>FAIL</a>
    <a>OK</a>
    </root>
    I would like to create html output like this
    ok=2
    fail=1
    I've searched the xpath reference but the best match to get this done was the count() function that doesn't seem to be able to select on value level.
    Can anyone help ?
    Thanks.

    count(//*[text()='OK'])
    or something like that (with the predicate) is what you are looking for.

  • What are the elements of this pic?

    I am doing a lookbook for a friends clothing brand and this pic I found one the internet really caught my attention. I was wondering how I could make a normal pic look like this? Thanks!

    You would start out with a blank, new file, then add objects to it. It requires use of layers, gradients, type tool, etc.
    Are you experienced using Photoshop Elements?
    Can you photograph objects that you wish to incorporate in to your project?

  • Count the number of occurrence in a string

    is there any api for counting the number of occurrence in a string or should i write a method myself?
    for example. I want to count "." in "1.2.3.4.". i want to count the dot in this string.
    I am just wondering.
    Thanks in advance.

    is there any api for counting the number of
    occurrence in a string or should i write a method
    myself?The latter.

  • How can I find the element with the closest value to a calculated "target value" in a 1D array?

    Hello all,
    may be the following question is very simple, but I am relatively new in labview and it would be great if somebody could help me:
    I have a acquaried 1D array of data-points. Now, I have to find the element in this array which value is the closest to a calculated "target value".
    After finding the element with the value close to the "target value", I have to get the position of this element (i.e. the index) in the 1D array.
    Now, I have to use this index to find and extract the element at this position in an other 1D array.
    It would be very nice if somebody could help me with this problem.
    Thank you,
    beam

    Find attached a sample vi that you can modify.
    Attachments:
    select_target_value.vi ‏22 KB

  • Problem getting the count of element

    Hi all,
    I am using a webservice which converts excel to string, which i store in an variable. I parse this variable using to parseXML function and assign it to and element type. The element is created from xsd. The xsd is created from the output of the webservice.
    <?xml version="1.0" encoding="UTF-8"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd"
    targetNamespace="http://TargetNamespace.com/IncomngCS"
    xmlns:tns="http://TargetNamespace.com/IncomngCS"
    elementFormDefault="qualified"
    attributeFormDefault="unqualified" nxsd:encoding="ASCII" nxsd:stream="chars" nxsd:version="NXSD">
         <xsd:element name="SHEET">
              <xsd:complexType>
                   <xsd:sequence>
                        <xsd:element name="ROW" maxOccurs="unbounded">                    <xsd:complexType>
         <xsd:sequence>
                                       <xsd:element name="DATESRV" type="xsd:string"/>
                                       <xsd:element name="TACT" type="xsd:string"/>
                                       <xsd:element name="TCHG" type="xsd:string"/>
                                       <xsd:element name="TAMNT" type="xsd:string"/>
         <xsd:element name="TQTY" type="xsd:string"/>
         </xsd:sequence>
         </xsd:complexType>
         </xsd:element>
         </xsd:sequence>
    <xsd:attribute name="currentrow"/>
         </xsd:complexType>
    </xsd:element>
    </xsd:schema>
    The variable of element type gives output as
    <var_tmp>
    <SHEET>
    <ROW>
    <DATESRV>2/3/2006</DATESRV>
    <TACT>100561141</TACT>
    <TCHG>3403516</TCHG>
    <TAMNT>249.55</TAMNT>
    <TQTY>1</TQTY>
    </ROW>
    <ROW>
    <DATESRV>2/3/2006</DATESRV>
    <TACT>100561141</TACT>
    <TCHG>3400934</TCHG>
    <TAMNT>72.55</TAMNT>
    <TQTY>1</TQTY>
    </ROW>
    <ROW>
    <DATESRV>2/3/2006</DATESRV>
    <TACT>100567114</TACT>
    <TCHG>3406931</TCHG>
    <TAMNT>34.5</TAMNT>
    <TQTY>1</TQTY>
    </ROW>
    </SHEET>
    <var_tmp>
    And now when i try to get the count(getVariableData('var_tmp','/sheet/row')) it always gives me 0. I tried to get particular row using index its still does not seem to work.
    Does anybody have any idea about this problem?

    Can you post your .bpel source so I can see what's going on there?
    Thanks
    Dan

  • Count the number of elements in comma seperated list of values

    Hello Friends,
    I have a string with comma seperated list of values say
    String v = 34343,erere,ererere,sdfsdfsdfs,4454,5454,dsfsdfsfsd,fsdfsdfsdfs,dfdsfsdfsdfs,sdsfdsf,ererdsdsd45454,fsdfsdfs
    Want to count how many elements are existing in this string .
    Thanks/Kumar

    Hi, Kumar,
    REGEXP_COUNT, which Hoek used, is handy, but it only works in Oracle 11. Which version of Oracle are you using?
    In any version of Oracle, you can count the commas by seeing how much the string shrinks when you remove them.
    LENGTH (str) + 1 - LENGTH (REPLACE (str, ',')) Can str have multiple commas in a row? What if there's nothing between consecutive commas, or nothing by whitespace? Can str begin or end with a comma? Can str consist of nothing but commas? Depending on your answers, you may have to change things. You might want
    REGEXP_COUNT ( str
                 , '[^,]+'
    I hope this answers your question.
    If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all tables involved, and also post the results you want from that data.
    Explain, using specific examples, how you get those results from that data.
    Always say which version of Oracle you're using.
    See the forum FAQ {message:id=9360002}

  • Count the number of elements in an Arraylist

    My arraylist has these elements inside it.
    [house,tom:, agent,, person,, untidy,jack:, ordered,, tidy,, tiled,roof,tom:, agent,, person,,.....]. The list continues like this.
    How can I count the number of elements after each tom upto before each jack and same for all words after jack and upto before tom? [for example in the first case there are 3 words after tom and there are 4 words after jack.]
    Thanks

    don't collapse your lists together. They represent separate data entities and should be kept separate. Go check your [other thread|http://forums.sun.com/thread.jspa?threadID=5416414&tstart=0].
    Edited by: DeltaGeek on Nov 17, 2009 11:07 AM

  • BPEL function to query the Element Name and get the count of elements

    Hi Guys,
    I have problem with the following, can you please help me out with this.
    Say i have an xml pay load:
    <ns1:sampleEBO>
                   <ns1:PhysicalLocation>
                   <ns1:propertis>
                        <ns1:filedType>12</ns1:filedType>
                             <ns1:filedType1>12</ns1:filedType1>
                             <ns1:filedType2>12</ns1:filedType2>
    <ns1:filedType3>12</ns1:filedType3>
                             <ns1:filedType4>12</ns1:filedType4>
                             <ns1:filedType5>12</ns1:filedType5>
    </ns1:properties>
    <ns1:propertis>
                        <ns1:filedType>12</ns1:filedType>
                             <ns1:filedType1>12</ns1:filedType1>
                             <ns1:filedType2>12</ns1:filedType2>
    <ns1:filedType3>12</ns1:filedType3>
                             <ns1:filedType4>12</ns1:filedType4>
                             <ns1:filedType5>12</ns1:filedType5>
                   </ns1:properties>
    <ns1:sampleEBO>
                   <ns1:PhysicalLocation>
    Here i want to retrive the Element name ( filedType,fieldType1,fieldType2......) using any BPEL function, not the value and also get the total number of elements in the each node ( <properties> ). If i am using the "count" function its returning 2 and it's counting the properties node not the elements in the properties node.
    So, can you please let me know of any function in BPEL which can do this ?
    Thanks,
    Krish

    you only want to use a default bpel function for this? not from within xsl?
    and the function should return an arraylist of elementnames i assume ?
                   <xsl:for-each select="//properties">
                        <xsl:for-each select="./*">
                             <xsl:value-of select="local-name()"/>
                             <xsl:choose>
                                  <xsl:when test="substring(local-name(),1,9) ='filedType' ">
                             </xsl:when>
                             </xsl:choose>
                        </xsl:for-each>
                   </xsl:for-each>
                   <count1><xsl:value-of select="count(//properties[1]/*)"/></count>
                   <count2><xsl:value-of select="count(//properties[2]/*)"/></count>the count can also be used in some for-each construction or from within your bpel flow itself (if you want to loop over there, instead of xsl)

  • Counting the amount of like elements in an array

    Hi,
    I am very new to labview and would be grateful if anyone could help with the following.
    I have an array of data and each element contains one of the integer values 0,1,2 or 3.
    I want to be able to count the number of times each of these occur. ie 3 occurs 10 times etc.
    This is probably a really simple problem but I cannot figure it out and would appreciate any help.
    Thanks,
    Maria

    Here's a more detailed version containing function labels so you cna recognize them better. It should be easy to built.
    This is basicallly a general integer histogram function and can easily be adapted for larger (and smaller) selections (e.g. if the possible numbers are 0..999 you would initialize an array with 1000 elements of zero and everything else would stay the same.
    If the possibilities are e.g. -5..5, you would use an array size of 11 and add 5 to each element.
    All clear?
    (Nick's solution would need to be rewritten whenever the number of tests changes and would be unmanagable for dealing with 1000 elements )
    Message Edited by altenbach on 03-02-2007 08:03 AM
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    counts2.png ‏7 KB

  • I have tried to view videos created in premiere elements 10 and I get the following message: "this file type is not supported, or the required codec is  not installed.  When it opens there is a red screen in the monitor panel with Korean writing which als

    I have tried to view videos created in premiere elements 10 and I get the following message: "this file type is not supported, or the required codec is  not installed.  When it opens there is a red screen in the monitor panel with Korean writing which also appears in the place of each clip in the video.  I tried uninstalling and reinstalling premiere elements 10, but that did not have any effect on the video.  Do you have any suggestions?  I researched codec, but do not understand them at all.

    gloucester
    In case you did not find it, the following is a copy/paste of the Announcement on Premiere Elements 19/NVIDIA GeForce
    that appears at the top of this forum.
    Premiere Elements 10 NVIDIA Video Card Driver Roll Back
    If you are a Premiere Elements 10 user whose Windows computer uses a NVIDIA GeForce video card and you are experiencing
    Premiere Elements 10 display and/or unexplained program behavior, then your first line of troubleshooting needs to be rolling
    back the video card driver version instead of assuring that it is up to date.
    Since October 2013 to the present, there have been a growing number of reports about display and unexplained workflow
    glitches specific to the Premiere Elements 10 user whose Windows computer has a NVIDIA GeForce video card. If this applies
    to you, then the “user to user” remedy is to roll back the NVIDIA GeForce video card driver as far as is necessary to get rid of
    the problems. The typical driver roll back has gone back as far as March – July 2013 in order to get a working Premiere
    Elements 10. Neither NVIDIA nor Adobe has taken any corrective action in this regard to date, and none is expected moving forward.
    Since October 2013, the following thread has tried to keep up with the Premiere Elements 10 NVIDIA reports
    http://forums.adobe.com/thread/1317675
    Older NVIDIA GeForce drivers can be found
    http://www.nvidia.com/Download/Find.aspx?lang=en-us
    A February 2014 overview of the situation as well as how to use the older NVIDIA GeForce drivers for the driver roll back can be found
    http://atr935.blogspot.com/2014/02/pe10-nvidia-video-card-roll-back.html
    ATR

  • Had a windows computer with my element 7.  Now just bought a Mac OSX   version 10.9.2 what would be the best photoshop elements for this machine.  I did download elements 12 from Apple store but kept getting incompatible message when trying to open a phot

    I thought elements were simple but maybe it is just me.  Having problems moving photos from iphoto to elements

    Duplicate post; see:
    had a windows computer with my element 7.  Now just bought a Mac OSX   version 10.9.2 what would be the best photoshop elements for this machine.  I did download elements 12 from Apple store but kept getting incompatible message when trying to open a phot

Maybe you are looking for

  • Apple iPod Battery Replacement Program Experiences.

    Hello, as you all know apple offers the battery replacement program for 99 dollars (now sixty something dollars). For any of you that have tried it, can you please tell us all a little about how was your experience? did you get a better ipod or a wor

  • Altova XML Spy parsing issue

    I wonder if anyone can help. Pasted below is an standard WSDL file has generated by BPEL Designer. However, XML Spy wont validate it, reporting: "The file is not valid. Unexpected element 'plnk:PartnerLinkType' in element definitions" Can anyone help

  • Folder Functionality

    Hi All, we have a requirement to create folder for material transaction form in inventory. they are exporting transaction data from this form to excel file. they dont need dublicate value we have created folder for this form and hide some dublicate f

  • FCPX 10.0.6 - why is the files transcoded as .m4v instead of .mp4 ?

    Hi there, In 10.0.4, after clicking share, the files are transcoded im mp4 format. But now in FCPX 10.0.6 - why are the files transcoded as .m4v instead of .mp4 ? In both instances I selected Apple devices. I noticed both the filesize are about the s

  • Hp deskjet 5550, fading print

    Trying to print out several pages the print fades with each one and by fourth page it just comes out white. Printing quality on first page also not up to scratch (seems to be thickened) but at least legible. When I try again hours later, having switc