Using a string slicer value to filter measure calculations

Hi, I have 6 calculated fields that each provide a cumulative cost value for tasks in different categories.  I would like to filter the total cumulative cost within one pivot chart to show only costs related to one project (out of a dozen or so). 
I have a query which retrieves the project names, I have a relationship the costs and projects tables, however the measures will show me ALL project cumulative costs, and when I select each project name as a slicer value, only the X-Axis date range changes
to reflect the date range of the project.  The cumulative costs remain the same, meaning the slicer value (project name) does not change the total cumulative costs in each category.
My formula for one of the calculated cumulative cost fields is below: (SumCapExAct is just
Sum([CAPEXACT]))
=IF (
    ISBLANK ( [SumCapExAct] ),
    BLANK (),
    CALCULATE (
        [SumCapExAct],
        FILTER (
             ALL(COSTS2) ,
            COSTS2[DATE]
                <= MAX ( COSTS2[DATE] )
Any Ideas on how I might have the selected Project Name filter the measures for each of my cumulative cost categories?
Thanks a million in advance!

Try changing ALL(COSTS2) to ALL(COSTS2[DATE])
Then the filters on the other attributes should work.
hth, Imke

Similar Messages

  • Function that returns N values, without using a string

    Hi, how can i make a function that returns several valures (that hasn't a exact number of returned values, it could return 3 values, or 7) without using a string?
    When i need to return several values from a function, i put the values inside a varchar like thus 'XXX,YYY,ZZZ' and so on. Don't know if this has a poor performance.
    If you can supply simple examples for what im asking, i would be nice.
    (without using a string)

    Can i create the type objects inside a package? If i
    can, they will be local to the package, right?Yes, you're right.
    Pipeline returns a row or several?You can use pipelined function in the same way you use table:
    SELECT * FROM TABLE(pipelined_funct(agr1, agr2));
    It returns results as separate rows.

  • How to calculate the value from prompt and use the value as filter

    Hi everyone,
    I am designing a OBI query. I want to write a query and one of it filters comes from the dashboard prompt. Say I want to make a query to pull out the record for 3 consective years and user wants to enter the last year # and omit entering the first 2-year code#.Thanks!

    Hi,
    if i understand your question
    you have a prompt for year.. and it's assigned with presentation variable, say: var_year
    And you are just entering value for only one year, say 2000.
    Then, the request (which is using that prompt value as filter) should display year values 2000, 2000-1 (i.e. 1999), 2000-2 (i.e. 1998).
    Is this your requirement?
    If then,
    Hope you are using edit box as control for year prompt and assign a presentation variable for that prompt.
    Now, in report go to filter of year prompt, click on advance > Convert this filter to SQL.
    write here... *Times.Year between @{var_year} and @{var_year}-2*
    And make sure that your var_year is integer, if not cast it to integer

  • Data transfer process: use values of filter in routine

    Hi,
    I create a filter in the data transfer process (RSA1). There are two infoobjects (ZABC, ZXYZ) in the filter.
    I fill the first select-option (parameter) with the value u2018AAAAu2019. At the second line I create the filter routine:
    form compute_/BIC/ZXYZ
       tables l_t_range structure rssdlrange
       changing p_subrc like sy-subrc.
    In this routine I want to use the value u2018AAAAu2019 of ZABC:
    SELECT SINGLE *
    INTO lw_test
    FROM /BIC/MZXYZ
    WHERE
       /BIC/ZBCA =  (Select-option value from ZABC = u2018AAAAu2019)
    Then I want to make a new entry in l_t_range from lw_test.
    I thought that the Select-option will be in the table l_t_range. But there is only a record when it was also set by an ABAP-Routine but not the manual entries in RSA1.
    How can I use the select-option from the filter?
    Thanks in advance
    Tobias Mattes
    Edited by: Tobias Mattes on Jan 30, 2009 1:33 PM
    Edited by: Tobias Mattes on Jan 30, 2009 1:34 PM

    Can you try to combine them into one routine?  In other words, fill the range for both in the same routine - that way, you'll have all the values available to you.
    For example:
    l_t_range-iobjnm = 'ZABC'.
    l_t_range-fieldname = 'ZABC'.
    l_t_range-sign = 'I'.
    l_t_range-option = 'BT'.
    l_t_range-low = '2006001'.
    l_t_range-high = '2006012'.
    l_t_range-iobjnm = 'ZXYZ'.
    l_t_range-fieldname = 'ZXYZ'.
    l_t_range-sign = 'I'.
    l_t_range-option = 'BT'.
    l_t_range-low = '0101010'.
    l_t_range-high = '0101099'.

  • How to exclude certain values in a measure.

    Hi,
    I have fact data something like..
    ID
    MyValue
    MySetValue
    1
    200
    1
    2
    300
    1
    3
    400
    0
    4
    500
    0
    5
    600
    1
    Now I want to create a measure MyValue which would be sum(MyValue). This i can do using SUM aggregation.
    But I also want a measure which is SUM(MyValue) but excludes rows for which MySetValue is 0.
    So first measure should return 2000 and second measure should return 1100.
    I know this can be done by adding a new column in view or in DSV which does the filtering. But is there a way of doing the same in calculated member ?
    Thanks.
    liquidloop[at]live[dot]co[dot]uk

    The best way is going to be creating a calculated column in your DSV (or view) and then defining a stored measure based on that calculated column. When business rules are applicable at the grain of the fact table, the best approach is going to be to include
    that logic at the fact table. There's ways to create it in the Calculation Tab of the Cube Editor but it's almost never the right way to go. The method that Charles uses above is a devastating bad approach as an aggregation function over a Filter clause though
    possible, the SSAS Engine when it sees a statement like those should just raise an error rather than processing the statement. (See point #1 in the following blog:
    http://sqlblog.com/blogs/mosha/archive/2008/10/22/optimizing-mdx-aggregation-functions.aspx )The real issue with the approach that Charles uses in your case above is that a Filter statement applies to the current context in aggregate and WILL NOT apply
    to each row at the source. Therefore, not only inefficient, it's also incorrect.
    To really approach the problem, you would need to create a dimension based on the MySetValue column. In the small example that you have above, that dimension would only have a single attribute hierarchy with  two members but in a real life situation,
    that column could and often would be a non-discrete function. Saying that you only have two possible values, and only the single attribute hierarchy with those two members, you could define the new measure as the following:
    CREATE
    MEMBER CurrentCube.[Measures].[Modified MyValue]
    AS
    IIf(
                  [MySetValue].[MySetValue].CurrentMember
    IS [MySetValue].[MySetValue].&[0],
    NULL,
                  [Measures].[MyValue]
    FORMAT_STRING="#,##0";
    However, the slice, ([MySetValue].[MySetValue].[All],[Measures].[Modified MyValue] would still be exactly equal to [Measures].[MyValue]. You could fix that using a SOCPE statement.
    SCOPE(
           [Measures].[Modified MyValue],
           [MySetValue].[MySetValue].[All]
    THIS = (
                  [MySetValue].[MySet Value].&[1],
                  [Measures].[MyValue]
    END
    SCOPE;
    So as you can see, just do it the right way to begin with. Create a column in your DSV and create a measure from that calculated column. 
    Martin
    Martin Mason Wordpress Blog

  • Read Query String Parameter Value in SSRS

    Hi,
    We have Project Server 2010 and Sharepoint Server 2010 env and using SSRS 2008 R2 for reporting purpose in Native mode.
    Here I am displaying the SSRS Project report in Project Server page using Report Viewer web part like below.
    Here I want to read projuid query string parameter value (Highlighthed above in URL ) in SSRS by using any way, so that I can pass that
    projuid value in my SSRS report parameter to filter and make this report dynamic.
    Right now I have to select the ProjectName (Label) which passes ProjUID
    as value from the Parameter, but I want it should read the projuid
    from URL so that this reports will display the project the data for the opened Project automatically
    Thanks and let me know in case we can achive this using OOTB or some custom functions.

    Hi,
    For the report parameter, you can get the value from database query or some embedded funcitons etc. or even some customerized function.
    You may consider to create your own code for the report to read the projuid from application or URL. The customer code can be used to get the values from the applicaiton or from the url etc. Then report can call the customer code function to get the value.
    refer link
    https://technet.microsoft.com/en-us/library/ms155798(v=SQL.100).aspx
    https://support.microsoft.com/kb/920769?wa=wsignin1.0
    Thanks,

  • Any way to use Delphi strings?

    I know that LabView can, when calling external libraries, use Pascal string pointers. However, those are limited, is there a way to call an external library using a Delphi string?
    FYI: a Pascal string uses one byte for it's length, a Delphi string uses 4 bytes. Since I'm using Delphi for implementing the DLL, using Delphi strings would be way more straightforward than using C strings.
    Solved!
    Go to Solution.

    Kirillenseer wrote:
    Thank you, I'll try to go with the handle method, pointer to a Delphi string reference. Still funny that LV string and Delphi string are the exact same beasts, yet can't interoperate seamlessly.
    They are not the same! They look the same in terms of the actual byte layout in memory, but the memory management is entirely different. The LabVIEW String is a LabVIEW Handle, an internal memory object managed by the LabVIEW memory manager functions and using a pointer to a pointer to the actual information. Any modification to the string that requires to change its size MUST be performed by calling the according memory manager functions, or a crash is immediately evident.
    The Pascal String is a memory area managed by the Delphi runtime library (and maybe, possibly, but likely not documented be implemented under Windows on top of the SysString datatype.) and repreents just a pointer to the data.
    If you want to pass in a string to a DLL function that is passed in by reference (VAR keyword) you can get away with configuring it as a  LabVIEW String handle. But if the string is passed into the function by value (just the String itself) this won't work at all. And if the function is supposed to return information in the string you can't do it without either a wrapper or some pointer magic implemented in the diagram. This is because if you configure it as a LabVIEW Handle, LabVIEW expects it to be allocated by its memory manager functions, but Delphi will do it with its Delphi runtime functions and as soon as LabVIEW attempts to free that string, it will crash, since the memory loacation is not allocated from the heap managed by the LabVIEW memory manager.
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Dynamically selecting values for filter in power pivot

    Hi,
    I am creating a power pivot report. I want the values of its filters to be set dynamically based on certain critreria. For Example, if some one changes the Iteration Path then the range of dates should change automatically to Iteration start date -
    Itearation End Date.
    Is there any way to set filter values based on some calculation.
    Any help in this regard will be highly appreciated.
    Thanks,
    Bhawna.
    Bhawna Aggarwal

    Check out the Event-In-Progress pattern as described here:
    http://cwebbbi.wordpress.com/2013/06/13/a-new-events-in-progress-dax-pattern/
    basically you need to create a separate measure which to do the specific filtering for you
    hth,
    gerhard
    Gerhard Brueckl
    blogging @ http://blog.gbrueckl.at
    working @ http://www.pmOne.com

  • How to use the same variable value for data entry and the planning sequence

    Hi,
    the scenario is the following:
    Using the WAD template a user enters cost center plan data. The cost center is selected by the chosen value for the variable "V1".
    Afterwards he shall push a button which starts a planning sequence (including saving the data and further functions). This planning sequence uses a filter that also contains the variable "V1".
    What or where has it to be defined that the planning sequence uses automatically the same value for the variable "V1" as selected for the data entry?

    You have to define in the planning function. The planning sequence is only a sequence and it read the planning functions underneath it.
    Ravi Thothadri

  • Using a string to reference a variable

    hi all,
    i've encountered an interesting scenario where i need to use a string to reeference the value of a variable...the following would show the scenario in a simpler way...
    let's say we have such function called foo:
    void foo(String aString)
    int a = 20;
    int b = 20;
    system.out.println(?????);
    now let's say i run the function as:
    foo("a")
    and i want it to return:
    20
    what should be put to replace those "?????" in my function above?
    please note that variables "a" and "b" are arbitary and so having a conditional statement like the following would NOT be useful:
    void foo(String aString)
    int a = 20;
    int b = 20;
    if (aString.equals("a"))
    system.out.println(a);
    if (aString.equals("b"))
    system.out.println(b);
    thank you very much!

    There are two possibilities here.
    The preferable one, if you have control over the names and nature of the variables, then don't use individual variables - use a Hashtable (or any implementation of Map). Your code would then look something like:void foo(String aString)
        Map table = new Hashtable();
        table.put("a", new Integer(20));
        table.put("b", new Integer(30));
        system.out.println(table.get(aString));
    }The down side to this is that you have to use Integers - Maps can't take primitives.
    If, on the other hand, you have to have variables, then take a look at using reflection. It's more complicated than using Maps, and less efficient, so I would recommend the first technique if possible.
    RObin

  • Convert String variable value  to an Object referece type

    Hi all,
    I want to know that if there any possible way to convert String variable value to a Object reference type in java. I'll explain by example if this is not clear.
    Let's think that there is a string variable name like,
    String name="HelloWorld";
    and there is a class name same to the variable value.
    class HelloWorld
    I am passing this string variable value to a method which is going to make a object of helloworld;
    new convertobj().convert("HelloWorld");
    class convertobj{
    public void convert(String name){
    // in hert it is going to create the object of HelloWorld;
    // HelloWorld hello=new HelloWorld(); just like this.
    now i want to do this from the name variable value.( name na=new name()) like wise.
    please let me know if there any possible way to do that.
    I am just passing the name of class by string variable then i wanted to make a instance of the class which come through the variable value.
    thanx.

    Either cast the object to a HelloWorld or use the reflection API (Google it) - with the reflection API you can discover what methods are available.
    Note: if you are planning to pass in various string arguments and instantiate a class which you expect to have a certain method... you should define an interface and have all of your classes that you will call in this way implement the interface (that way you're sure the class has a method of that name). You can then just cast the object to the interface type and call the method.
    John

  • Can't change string variable values in Flash CS4 Debugger

    I'm using the Flash CS4 debugger, and while I can change numeric variable values in the Variables panel, I can't change string variable values. The only characters the fields accept are the numbers 1-9 and the characters "d" and "j".
    I can  paste strings  into the value fields, but that's a bit of a pain. I've tried this on a couple of different Flash CS4 installations and get the same results.
    Does anyone know if it's possible to change string values in the Variables panel of the Flash CS4 Debugger?

    See:
    http://forum.java.sun.com/thread.jspa?threadID=591012&tstart=15

  • Using XSLT to extract value of a XML node with namespace

    I have a XML source code here.
    <?xml version="1.0" encoding="utf-8" ?>
    <rss version="2.0" xmlns:job="http://www.pageuppeople.com">
      <channel>
        <title>SMH Jobs</title>
        <link>internalrecruitment.smhgroup.com.au/jobsrss.ashx?stp=di</link>
        <description>A listing of jobs available here</description>
        <item>
          <title>eCommerce Optimisation Advisor</title>
          <description>A new and exciting opportunity exists for an experienced eCommerce Advisor to join</description>
          <job:location PUReferenceID="3711">Sydney - Inner Suburbs & CBD</job:location>
        </item>
      </channel>
    </rss>
    I want to use XSLT to extract value of a XML node with namespace <job:location>, and the returned value should be string 'Sydney - Inner Suburbs & CBD'. I tried a few XSL code below, but failed with error or nothing was returned.
    <xsl:value-of select="job:location" disable-output-escaping="yes"/>
    <xsl:value-of select="job/location" disable-output-escaping="yes"/>
    <xsl:value-of select="job\location" disable-output-escaping="yes"/>
    <xsl:value-of select="location" disable-output-escaping="yes"/>
    This might be an easy question for you, but I would appreciate if anyone can help.

    Hi Suncorp IT Learner,
    We need to tell the XSLT that some elements are in another namespace. Copy the xmls declarations for the prefixes you need to use. Then use the xsl format as:
    <xsl: value-of select=”job:location/@PUReferenceID”/>
    In following issue, Chriztian has a good explanation:
    http://our.umbraco.org/forum/developers/xslt/33353-XSLT-reading-XML-attribute-value
    Thanks,
    Qiao Wei
    TechNet Community Support

  • Exchange BPA Errors (Exchange server is a virtual machine but the additional tools are not installed and The 'Services' string type value located in 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ExchangeServer\v14\Setup\Services' registry key is missing)

    Hi,
    I am running BPA on My Exchange 2010 VM (Server 2008 R2 VM on Hyper-V) and get the following errors:
    The 'Services' string type value located in 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ExchangeServer\v14\Setup\Services' registry key is missing or inaccessible. The Microsoft Exchange Information Store service won't start. As a result, all services that depend
    on this service won't be able to start
    Exchange server [Exchange Server FQDN] is a virtual machine but the additional tools are not installed. This configuration is not supported. Install Virtual Machine Additions for this guest.
    Problem is that, for the first, that Key exists and the service is actually running fine. And for the second my VM tools are already installed.
    Hopefully someone out there has had the same issue and can assist.
    Pete

    Hi Pete,
    For the first error message, please try the following steps:
    Make sure the Information Store service is in Starting status,
    Automatic startup type and works well, as a test we can try to
    restart the Infroamtion Store service and verify the service works well.
    Start
    Registry Editor, find the registry key “Services” under “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ExchangeServer\v14\Setup”, its value is “C:\Program
    files\Microsoft\Exchange Server\v14”(default install location), please check your registry, make sure the key “Services” exist and value is the Exchange Server install location and the
    location is accessible;
    Start
    Registry Editor, and locate the following registry key:
    HKEY_LOCAL_MACHINE\Software\Microsoft\Exchange\Setup
    Use the
    Permission option under the Security tab to check the permission setting on this key. Make sure
    System is in the list with Full Control permissions if the service account is Local System. If you are not using Local System as the service account, check the existence of the corresponding account in the list and ensure that
    it has Full Control permissions. Please refer to this article:
    Title: Exchange Store Does Not Start: Errors 7024, 1026, 9542, and 5000
    Link:
    http://support.microsoft.com/kb/285116
    Start
    ADSI Edit, and then browse to the following location:
    Domain.com/Configuration/Services/Microsoft Exchange/Org/Administrative Groups/AdminGroup/Servers/Server Name
    Right-click the
    server name, and then click Properties.
    Click the
    Security tab, make sure this own server’s server object have
    full control permission on its own server.
    If not or the object is missing, please modify the permission or click
    Add, locate the computer account for the Exchange Server computer, add it to the Permissions list with full control.
    Click OK, and then close ADSI Edit.
    Use
    Active Directory Users and Computers to add the current affected
    Exchange Server computer account to the Exchange Servers(previous version should be “Exchange Domain Servers”) group in the
    Microsoft Exchange Security Groups( or Users) OU. Refer to this article:
    http://support.microsoft.com/kb/297295.
    Restart the Exchange Server computer, then rerun the ExBPA.
    For the second error message, Microsoft don’t recommend to install Exchange Server on virtual machine without additional tools, so the error message occurs. We can just ignore
    this message, it will not affect the Exchange servers.
    Regards, Eric Zou

  • Receiver SOAP Adapter Use Query String

    Hello everybody,
    I want to include in my Receiver SOAP Adapter the message id as part of the URL String, but I need to include only the MessageId value, if I use the Use Encoded Headers and Use Query String options it includes all the header fields as part of the URL, is there a way to define only the fields that I need?, thanks in advance.
    Regards,
    Julio Cesar

    May be you could try to use adapter specific message attribute "TServerLocation". This will help you set the dynamic URL.
    http://help.sap.com/saphelp_nw04/helpdata/en/29/5bd93f130f9215e10000000a155106/frameset.htm
    Regards,
    Prateek

Maybe you are looking for

  • Printing issue when converting an .indd file to .pdf

    All, I have two .indd files that loose color when printing after .pdf conversion. The first file looses all color and changes the text font. The second file prints correctly on the first page but not the second. The seond .indd file looses it's color

  • XML C++ Parser in Solaris 2.6 could not parse with base64

    I am using XML C++ Parser (version 2.0.4) in Solaris 2.6 I am using the following definition in dtd file to process binary data. <!ELEMENT Agent (base64)> I have two problem from xmlparse() function. 1. This declaration always produces a warning: LPX

  • Hyperlink on a field in BI report in CRM UI leading to CRM transaction

    Hi Experts, Can any one please suggest on how to we accomplish this task in CRM UI provision of hyperlink on a field in BI Report leading to the corresponding activity in CRM for maintenance Thanks and Regards, Kiran

  • How to set date format dd.MM.yy for chart time axis

    Is it possible to set default date format dd.MM.yy instead of MM/dd/yy in Flex charts without using label function ? In this case we do not know beforehand the length of the time span; it can be minutes, days or weeks. Setting locales in compiler opt

  • Mac OS X 10.4.4 fixes shadow and colour issues in PDFs?

    Apple's release notes for the Mac OS X 10.4.4 Update state: Shadows within a PDF document created in Mac OS X 10.4.4 or later are visible in Adobe Reader as well. Resolves an issue in which some PDF files could appear with inverted colors in Preview