Count with a conditional from another DATASET

Hi guys!
How could I count records in a table from another Dataset? I tried this, but I got syntaxis error on the comma that indicates the dataset. Please.
=Count(IIf((Fields!new_leadsourceid.Value, "AllNewLeads") = Fields!new_leadsourceid.Value, 1, Nothing))
Thank you.

What do you mean "bring the data by groups"? And "total
count, but divided by groups", do you mean you want an average across multiple input arrays?
The Lookup expressions can be scoped to any valid scope. What is a valid scope depends on the context. If I put a Lookup expression in a table cell that is contained within a group, a valid scope is that group or any parent group up to and including the
table's dataset.
The custom code can be modified to accommodate multiple groups in the input and to return the total elements from all input arrays. The restrictions on custom code are the assemblies available on the server(s) where the code will execute. In most cases,
server admins are reluctant to add custom assemblies or additional packages to their server. As long as you restrict your the code to use only what is available in the core .Net assemblies, it shouldn't be a problem. This custom code shouldn't be a problem
for that.
"You will find a fortune, though it will not be the one you seek." -
Blind Seer, O Brother Where Art Thou
Please Mark posts as answers or helpful so that others may find the fortune they seek.

Similar Messages

  • SSRS Expression to compare two values and get data from another dataset

    Hi,
    I have a requirement where in i need to compare a value of a dataset (not the one which table is poiting to)
    with the value of a text box, and return the count if it matches else 0, the expression is as below. Here 
    industryName and recCount are from the dataset ds_MedimOrLowImpactEntities.  whats wrong in this expression
    =Sum(IIF(Fields!industryName.Value = reportItems!hpapra_name.Value, Fields!RecCount.Value, 0), "ds_MediumOrLowImpactEntities")
    This is the error that i am getting:
    Any help on this is appreciated
    Kruthi Hegde

    Hi Kruthi,
    After testing the issue in my local environment, I can reproduce it. Just the error message said, “Aggregate function can be used only on report items contained in page headers and footers”. So the sum function that contains report items should be stayed
    at page headers or footers. Besides, you said the hpapra_name textbox contain a field from another dataset, not the ds_MedimOrLowImpactEntities dataset. While in Reporting Services, Report item expressions can only refer to other report items within the same
    grouping scope or a containing grouping scope. So consider the two issues, we should use some other expression to instead the “reportItems!hpapra_name.Value” expression.
    Take a look at the "Looking up values from another dataset" topic here:
    http://msdn.microsoft.com/en-us/library/ms159673.aspx#LookupFunctions
    Hope this helps.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Initialize a global with a global from another file

    hi,
    I know that initialization order for global variables across compilation units is not defined, but if I have
    file1.cpp
      int x0 = 33, x1 = 55;
      extern int y0, y1;
      static int a[] = { y0, y1 };
      void print_a( void ) { printf( "\na[0] = %d\na[1] = %d", a[0], a[1] ); }
      extern void print_b( void );
      main()
        print_a();
        print_b();
    and file2.cpp
      int y0 = 77, y1 = 99;
      extern int x0, x1;
      static int b[] = { x0, x1 };
      void print_b( void ) { printf( "\nb[0] = %d\nb[1] = %d", b[0], b[1] ); }
    I notice that values are displayed correctly and consequently, initialized in the order I need. So what's the secret, coincidence, am I lucky? Does it make any difference if file2.cpp is part of a static library?
    Thanks

    @ Igor Tandetnik: Yes, I chose an example with circular dependency just to show that it was not the situation that, by luck, the "other" file was was initialized first. Yes, I would like a solution for such circular dependency, but I hope that I will
    find, at least, a solution for the case when such circular dependency does not exist. What I want to achieve? As the title says, I want a solution to be able to initialize globals with globals from another file, a solution as general and fault proof and convenient
    as possible.
    @ Wyck: I thought about something like that, problem is that in case of large arrays there is a lot to type. Another solution (it saves a little typing) I saw was something like
    // common_header.h
    #define LIST_A  y0, y1
    #define LIST_B  x0, x1
    // file1.cpp
    #include "common_header.h"
    Number x0(33), x1(55);
    static Number a[] = { LIST_A };  // just to give correct size
    // file2.cpp
    #include "common_header.h"
    Number y0(77), y1(99);
    static Number b[] = { LIST_B }; // just to give correct size
    // init.cpp
    extern Number LIST_A, LIST_B;
    void init()
    {  Number a_[] = { LIST_A };   Number b_[] = { LIST_B }; // stack usage
       for( int i = 0; i <_countof( a_ ); i++ )  a[ i ] = a_[ i ];
       for( int i = 0; i <_countof( b_ ); i++ )  b[ i ] = b_[ i ];
    This still has the problem of using much stack in case of large arrays and if array members are more complex structures (might also contain string literals), there is a bit more difficult.
    Bellow is a solution I came up with using macros but which I don't really like because is a bit cumbersome. I'm looking for something better/more elegant/safer or simply I want to see what other solutions people see here.
    // file1.cpp -------------------------------------------
    #define MEMBER_LIST( Usage ) \
    Usage( x1 ) \
    Usage( x2 )
    #define IMPORT( ext_member ) extern Number ext_member;
    #define COUNT( member ) 1 +
    #define LOAD( member_val ) a[ i++ ] = member_val;
    Number y1 = 77, y2 = 99;
    MEMBER_LIST( IMPORT )
    static Number a[ MEMBER_LIST( COUNT ) 0 ];
    static void InitGlobals_a( void ) { uint8 i = 0; MEMBER_LIST( LOAD ) }
    extern void InitGlobals_b( void );
    int _tmain(int argc, _TCHAR* argv[])
    { InitGlobals_a();  InitGlobals_b();
    return 0;
    // file2.cpp -------------------------------------------
    #define MEMBER_LIST( Usage ) \
    Usage( y1 ) \
    Usage( y2 )
    #define IMPORT( ext_member ) extern Number ext_member;
    #define COUNT( member ) 1 +
    #define LOAD( member_val ) b[ i++ ] = member_val;
    Number x1 = 33, x2 = 55;
    MEMBER_LIST( IMPORT )
    static Number b[ MEMBER_LIST( COUNT ) 0 ];
    void InitGlobals_b( void ) { uint8 i = 0;  MEMBER_LIST( LOAD ) }
    Of course, something like
    #define MEMBER_LIST( Usage ) Usage( x1 ) Usage( x2 )
    could be further simplified using other macros so you can simple use
    #define MEMBER_LIST x1, x2
    but those additional macros will add up to the complexity.

  • Copy standard cost with Cost Component from another material

    Hi,
    I need to copy standard cost from another material not only total price but also details of cost component split. I try to used transaction CKUC with procedure of "explode material cost estimate" but the reference material use "mixed costing" and isystem stop explosion.
    There is another procedure in order to make this copy? I can not use special procurement because are different codes (material A / Plant XXX copy froma material B /Plant XXX).
    Thanks for your support.
    Mic

    Hi Chandra,
    thanks for your suggestion, it works but only if I explode a level ... material "B" contains two mix codes  that also contain their mixes. So system shows this message "Mixed cost estimate explosion in level 2 for material xxx" and "Mixed cost estimate exists: maximum of 2 explosion level (s) possible".
    So Is not possible to copy and esploded a standard cost with multi level mix?
    Thanks
    Michela

  • How to create 2 conditions from 2 datasets in row visibility SSRS

    Hi Experts, 
     In ssrs, I want to create an expression for the row visibility. But, the expression will contain 2 conditions from different 2 datasets (DealStarts & RowofTrendingVisibility). I have applied a solution from online, but got an error message is 
    "The Visibility.Hidden expression for the tablix ‘Tablix9’ contains an error: [BC30451] Name 'launchdate' is not declared. "
    I think that there is a minor issue in my syntax. Can some one help me to correct it?  Thank you. 
    =iif ((Last(MonthName("DealStarts"))=monthname(month(today())) or launchdate ("RowofTrendingVisibility")<Parameters!StartDate.Value),true, false)

    Hi JTan414,
    I have check the expression you have provided and there are many incorrect using of this expression, please check and do some modification as below:
    For the MonthName function you should follow the grammar like:
    =MonthName(10,True)
    =MonthName(Month(Fields!BirthDate.Value),False)
    ="The month of your birthday is " & MonthName(Month(Fields!BirthDate.Value))
    You have add the dataset name "DealStarts" at the wrong place, it should like below:
    =Last(MonthName(Month(Fields!BirthDate.Value)),"DealStarts")
    or
    =Last(MonthName(Fields!IntegerValueField.Value),"DealStarts")
    This will return the last value from the dataset
    There is no function named launchdate, expression "launchdate ("RowofTrendingVisibility")" is incorrect and you shouldn't add the datasetname in this way.
    If the expression involved of conditions from two different datasets, limit kinds of functions will support to use:
     =Last(Fields!BirthDate.Value,"DataSetName")
    =First(Fields!BirthDate.Value,"DataSetName")
    More details information about how to use expression in SSRS:
    Expression Examples (Report Builder and SSRS)
    If you still have any problem, please try to provide more details information about your requirements and also some sample data.
    Regards,
    Vicky Liu
    Vicky Liu
    TechNet Community Support

  • Read group membership for a user object and populate every group with matching user from another domain

    I have LON\JSmith in LON domain and DEL\JimSmith in DEL domain
    I would like to extract group memberships of LON\JSmith in LON domain and append matching by email (i.e. DEL\JimSmith) user object in every group in LON domain.
    for instance
    LON\JSmith and DEL\JimSmith is the same person and has same email address [email protected]
    LON\JSmith belongs to 3 groups - LON\localadmingroup;LON\univdesktop;LON\globalsurvey
    The outcome of the script should be
    LON\JSmith; DEL\JimSmith    should be in 3 groups - LON\localadmingroup;LON\univdesktop;LON\globalsurvey.
    How can i do it?
    Navgup

    Hi Navgup,
    Please refer to the script below, to query users in other domain by specifying the parameter "-Server" in the cmdlet "get-aduser", and also note I haven't tested the script below:
    import-module activedirectory
    get-adgroupmember "group"|foreach{
    $email=(get-aduser $_.samaccountname -properties *).EmailAddress#get the user email
    Get-ADUser -filter {EmailAddress -eq $email} -properties * -server DomainB.company.com|select samaccountname, memberof}#filter user name and group with the email in other domain
    To get users across domain, please also refer this blog:
    Adding/removing members from another forest or domain to groups in Active Directory:
    http://blogs.msdn.com/b/adpowershell/archive/2010/01/20/adding-removing-members-from-another-forest-or-domain-to-groups-in-active-directory.aspx?Redirected=true
    I hope this helps.

  • How to load DataBlock based on the Multiple Condition from another block

    Hi
    How to load a Data Block based on the Multiple values from another block. For eg.EMP is the Master Data block and SAL is the child Datablock.When query JOS% in the Master Block(EMP) then display all the Sal details in the SAL block for all the employees starting with JOS , When clicking one buton or if it is possible in the loadin of the MasterBlock

    Hi,
    I presume you are using database block relations.
    Put automatic query = yes in relation properties.
    Do you have block level trigger ON-POPULATE-DETAILS?
    In that you can find the relation and query - Using built-ins
    Find_Relation and Query_Master_Details

  • UPDATING A TABLE WITH SAME INFO FROM ANOTHER TABLE ON THE SAME DB

    0down votefavorite
    I am trying to update a table with info from another table on the same db with same table name. I just want the info to be the same , no primary key or constraint involve just a straight replacement of records and I keep getting errors WITH THE TABLE not
    being recignize. below is my query:
    UPDATE
    VNDFIL
    SET EOBTYP
    =  VNDFIL.EOBTYP, 
    EDI_X12_835_VERSION =  VNDFIL.EDI_X12_835_VERSION
    FROM
    AGERECOVERY
    WHERE
    VNDFIL.EOBTYP
    = VNDFIL.EOBTYP
    AND
    VNDFIL
    .EDI_X12_835_VERSION
    = VNDFIL.EDI_X12_835_VERSION

    Hi rotary,
    If those two same named tables are in the same database then they have to be in different schemas. If you mean they are in the same server instance, then they may be in different databases, besides the "table not being recognized" error,
    anyway you should use the fully qualified table names, that is database.Schema.Table(If across instances, ServerName should be prefixed) to avoid the table unrecognized error.
    Using Identifiers As Object Names
    With the fully qualified names, your update statement can be like below.
    UPDATE
    db1.schema1.VNDFIL
    SET EOBTYP = srcTbl.EOBTYP, EDI_X12_835_VERSION = srcTbl.EDI_X12_835_VERSION
    FROM
    db1.schema2.VNDFIL srcTbl
    WHERE
    db1.schema1.VNDFIL.EOBTYP = srcTbl.VNDFIL.EOBTYP AND
    db1.schema1.VNDFIL.EDI_X12_835_VERSION = srcTbl.VNDFIL.EDI_X12_835_VERSION
    If you have any question, feel free to let me know.
    Eric Zhang
    TechNet Community Support

  • Problem with creating site from another computer!

    Hi
    I have WebDB 2.2 and Oracle8i instaled on the same computer. I have a problem to create site from another computer. There is not any process when I try to create site. There is always 0%.
    But I have no problem with creating site on the origin computer.
    Does anybody know something about it?

    I am just not clear what to do once I have made changes and have published the new information.
    You shouldn't have to do anything. iWeb will save the information in the Domain.sites file. You can keep this file in a folder, or even on your desktop and iWeb will launch from a double-click on the file.

  • Count with multiple conditions (XML publisher)

    I'm trying to only count an EMPLID if multiple conditions have been met in an RTF.
    This works for 1 condition: <?count(xdoxslt:distinct_values(EMPLID[../FIRSTYEARFRESHMAN=1]))?>
    But how do I do multiple conditions? I've tried <?count(xdoxslt:distinct_values(EMPLID[../FIRSTYEARFRESHMAN=1] AND [../APPLIED_FOR_NEED_B=1]))?> and <?count(xdoxslt:distinct_values(EMPLID[../FIRSTYEARFRESHMAN=1 AND ../APPLIED_FOR_NEED_B=1]))?> but those both don't work.
    Thanks!

    similar problem for xdoxslt:distinct_values(EMPLID[condition1 and/or condition2])
    How to calculate count distinct (by xdoxslt:distinct_values) with a condition expression

  • Breakout table (fill table with matching data from another table)

    Hi
    I've been trying to study old discussions about breakout tables. I feel I'm close, but still no cigar :-)
    In plain english, I'm trying to autocreate rows with data on a table, based on matching values from another table. E.g. have a table to display all rows where type = AssetX
    I have attached a screenshot of my "master table" called Assets:
    I'm looking to prefill Asset name, Total from this table and populate a new table called e.g. Greenhouse
    Where I'd be adding more data (date, income, expense).
    Any help whould be greatly appreciated.
    Thanks!

    Hi,
    Here is a Sample Query.
    Update Emp A
    Set Sal = (Select Sal from emp b where
    a.empno = b.empno)
    where empno in (select empno from emp);
    Regards,
    Ganesh R
    null

  • Controlling a SubVI with while loop from another VI

    Dear All,
    this might be an easy Question but i couldn't catch an answer for it.
    first of all i have a VI which i will use as a subVI , this VI  is simply as shown in the "test_out of scope.vi" attached file
    now i will use it inside another VI called "Main VI" as shown in the file "Main_VI.vi"
    i'm just wondering , why couldn't i control the "Frequency" and "Stop" as i can do so while running the SubVI only without accessing it from another VI ?
    isn't it possible to access objects inside a while loop from another VI if i just connected them in the connection Pane terminals ??
    Thanks in advance to everybody
    Message Edited by Mohammed.Ashraf on 06-09-2009 10:27 AM
    Eng. Mohammed Ashraf
    Certified LabVIEW Associated Developer
    InnoVision Systems Founder, RF Test Development Engineer
    www.ivsystems-eg.com
    Attachments:
    Main_VI.vi ‏10 KB
    test_out of scope.vi ‏30 KB

    Do you need the sub-vi to run iterations for an undertermined period of time? 
    If so, then why not implement it as a parallel loop to the main one.  Maybe part of a consumer loop.
    If not.  Where the main loop would take care of each iteration and call the sub-vi in one shot. Then no need for a loop in the sub-vi.  
    It's all a matter of how you want the software to behave.  Have you looked at Event Structures?
    R

  • Displaying Customer Exit Variable with derived value from another ODS

    Hi All,
    Sorry if this question has been answered before.  I searched the forums and could not find anything specific to my problem.
    I am new to BEx Query.  Customer is requesting a variable(s) be created which will be displayed as a column along with other CKF and RKF.  This query is a payroll query for US/Canada.  This new variable will be based on the user input date for the query.  We are to take this date and go look up the actual pay date for the pay period to which the user input date belongs.  The pay date is stored in another ODS.
    So far, as far as the changes to the Customer Exit ZXRSRU01 are concerned, I would perform the logic when I_STEP = 2.  Do a basic selection off the second ODS, derive the pay date, and store in range table E_T_Range.
    The data displayed off the user input date is displayed in rows.  This is done six times, going back seven days for each row (first row is data for period user entered date to user entered date - 7 days; second row is data for period user entered date - 7 days to user entered date - 14 days; etc ...).  For this to happen  correctly, I am assuming the variable(s) are to to have characteristic types 'Not ready for input', 'Mandatory', 'Customer Exit', and 'Single Value'.
    My question is ... How do I display the six variables in columns (how are they to be defined in the query) and the characteristics I list above, are they correct? Does this need to be a replacement path variable?
    Thanks.
    Edited by: Amir Hasan on Jun 11, 2009 6:24 PM
    Edited by: Amir Hasan on Jun 11, 2009 6:25 PM

    Hi Amir,
    What i can understand from u r requirement is you want to few columns that will show something like below,
    User entered date = x
    Period of X to Period of (X-7)       Period of X to Period of (X-14).....
    This can be done by CMOD for variable only.
    Logic steps :
    1) Take the user input.
    2) Find out the period by using T009B table and store in temp variable.
    3) Do day -7 and find out period for the same
    4) Assing period of X to ls_range-high range and X-7 to ls_range-low.
    Let me know if you have any doubt
    Regards,
    Viren

  • Call method with an argument from another view controller

    I have a UIViewController MainViewController that brings up a modal view that is of the class AddPlayerViewController. When the user clicks 'Save' in the modal view I need to pass the Player data (which is a Player class) from the modal view to the MainViewController in addition to triggering a method in the MainViewController. What's the best way to accomplish this? I'm new to cocoa and have only tried using delegates and some ugly hacks to no avail.
    Thanks for the help.

    If I understand correctly, you have:
    1. A model object, Player.
    2. A top view controller, MainViewController.
    3. Another view controller, AddPlayerViewController, which MainViewController displays modally.
    I'm guessing that AddPlayerViewController creates a new Player object and lets the user set its values, and you need a way to get that new Player into MainViewController once they're done.
    So, here's what I'd do:
    1. Create an AddPlayerViewControllerDelegate protocol. It should declare two methods, "- (void)addPlayerViewController:(AddPlayerViewContrller*)controller didAddPlayer:(Player*)newPlayer" and "- (void)addPlayerViewControllerNotAddingPlayer:(AddPlayerViewController*)controll er".
    2. Add an attribute of type "id <AddPlayerViewControllerDelegate>" called delegate to AddPlayerViewController. Also add a property with "@property (assign)" and "@synthesize".
    3. Modify AddPlayerViewController so that if you click the "Save" button, addPlayerViewController:didAddPlayer: gets called, passing "self" and the new Player object as the two arguments. Also arrange for clicking the "Cancel" button to call addPlayerViewControllerNotAddingPlayer:.
    4. Modify MainViewController to declare that it conforms to AddPlayerViewControllerDelegate. Implement those two methods (addPlayerViewControllerNotAddingPlayer: might be an empty method if you don't want to do anything).
    5. When you create your AddPlayerViewController, set its delegate to your MainViewController.
    If you need more detail, let me know what parts you need me to elaborate on.

  • Auto Populate Field in One Table with Primary Key from another table.

    Greetings all,
    I have created two tables. One for Root Cause which will be the based description information of an analysis. Each Root cause can have many corrective actions.
    My Table structure is as follows:
    RCCA TABLE:
    =====================================
    Column Name     Data Type     Nullable
    RCCAID     NUMBER     No
    DESCRIPTION     VARCHAR2(4000)     Yes
    SUMMARY     VARCHAR2(4000)     Yes
    OWNER     VARCHAR2(4000)     Yes
    DATEOFINCIDENT DATE     Yes
    STATUS     VARCHAR2(4000)     Yes
    CORRECTIVE ACTION TABLE
    =====================================
    Column Name     Data Type     Nullable
    CAID     NUMBER     No
    RCCAID     NUMBER     No
    CANUMBER      NUMBER     Yes
    CACTION     VARCHAR2(4000)      Yes
    DATEDUE     DATE     Yes
    COMMENTS     VARCHAR2(4000)      Yes
    So I have a form that creates the RCCA and then I have another form that I want to feed off of the first form. My thought was that when the RCCA was created, it would open a report of the RCCA and then in another region of the page I would add corrective action form. What I am looking to do is when I press the Create Corrective Action, it will automatically populate the RCCAID in the Corrective Action Table so that it is associated directly to the RCCA. I don't want to have to have someone know what the RCCAID is from teh RCA table because they are autogenerated.
    There may be a better way to do this and since I am new to APEX and to Oracle Databases, I am just going with what my logic tells me. Any assistance or thoughts would be appreciated.
    Assuming there would be some type of trigger?
    I will have to be able to view each RCCA and CA in a report that customers will see.
    Thanks in Advance
    Wally

    Hi Debasis,
    Have a look on this
    Quick note on IDENTITY column in SAP HANA
    Regards,
    Krishna Tangudu

Maybe you are looking for

  • Parameters in the SQL statement.

    Hi I am creating a PL/SQL report. The report has for example 3 columns say X,Y,Z. When i run the report, i have 2 non-mandatory parameters P1 and P2. My question is, If i enter a value in the parameter P1, then the where condition of the report shoul

  • Hard Drive Failed, MacBook Pro Rejecting Replacement

    On Thursday night my MacBook Pro (2010, 13'') froze and wouldn't respond, so I powered-off using the power button. Upon restart all I got was the Apple logo and the spinner; no matter how long I left it it wouldn't boot any further than that. Booting

  • CRM_ORDER_MAINTAIN - Sales order - quantity

    Sales orders are created by using CRM_ORDER_MAINTAIN. item 10 - Quantity = 2 and confirmed qty = 2 item 20 - Quantity = 2 and confirmed qty = 0. (all the values are passed as it is for both the items). If the same order is created manually from CRMD_

  • DB Link issue

    Hello, After reading through some of the posts that my search for "DBLink" returned, I was wondering if you could give me some general guidelines on troubleshooting. Here's my story: Users report an issue in Production regarding vendors that should s

  • BSOD BugCheck 1001 Three Times In Three Days

    I apologize for making yet another topic on this same issue but I'm not that big on reading .dmp files, and you folks know what's what better than I do. I did a fresh installation of Windows 7 about a week ago but now - for the first time since forev