USING LOOKUP FUNCTION IN CHART

Good Afternoon,
I have created a simple chart in SSRS that is sourced from Analysis Services. The Grouping is by Month and the values are just attendances per month.
I want to add a 2nd series to this chart using a stored procedure in SQL.
Both share the field Month and could be linked on that field.
Does anybody know how I can use the lookup function to add this field to my chart.
Thank you

You can lookup by month. In the chart values, add a new series by clicking the Plus icon and choosing Expression. You expression should look something like:
=Lookup( Fields!AS_Month.Value, Fields!SP_Month.Value, Fields!SP_Value.Value, "SP_Dataset" )
The abbreviation AS refers to your analysis services dataset, while the SP refers to your dataset using the stored procedure. The expression matches each month used in the chart (the category group) with the month in the other data set, and retrieves the
SP_Value field to show on the chart.
If the month numbers/names match exactly, then it will work fine.
Regards,
Andrew Borg Cardona

Similar Messages

  • Using lookup function but to show multiple returns?

    Okay so I have been talked through how to use a lookup function to show which student in my class has scored the highest grade.  The formula used displays there name in one column and the score they achieved in another column which I have set up in a small seperate table.  However as suggested in my intial lookup function search it was suggested that I would encounter a problem if two students both achieved the same highest score.  However in the results table I have created it only shows one student.  Is it possible to have a function or formula that will simply show the top scores and the students that scored it when they are tied? 
    Thanks
    Marcus

    The easiest way to accomplish this, Marcus, is by simply sorting all rows by grade.  Sure, you can click on the column tab and hit "sort ascending", but I'm guessing you want something a little more dynamic than that.
    So I've set up a class of 20 students and gave them all random grades btwn 40 - 99.  (That's how it was done when I was in high school.  )  I added a third column which takes that grade, multiplies it by 1000, and adds the row number of the student.  This creates a unique identifier based on a possibly-non-unique grade:
    Now it's simply a matter of using the LARGE function to rank these new identifiers, and then using LOOKUP to get the actual grade and name for that identifier.  (Note that the grades changed; changing the focus from one cell to another creates new random values for the grades.)
    The formula for columns b and c for this Ranking table are standard Lookup functions:
    =LOOKUP($A1,Grades :: $C,Grades :: $B) to get the grades  ($A2 for 2nd column, etc.), and
    =LOOKUP($A1,Grades :: $C,Grades :: $A) to get the names.
    I'd suggest hiding these identifier columns.
    Now, to limit this display to the "X" highest grades, I'm going to continue this into another reply.
    Vince

  • Aggregate using Lookup function

    Is there any way to get a sum or average of data from a dataset using a Lookup function?
    I have daily currency data, and want to use a lookup function to get monthly averages - at this stage, the lookup function will only return the data for the first entry of the month.
    Thanks

    Hi MIDASuer,
    Per my understanding that you want to get the sum or monthly average value based on the daily currency data, right?
    I have tested on my local environment and I assumed that you have an date/time type field in the table, if so, we can get the month value based on the daily date and then create row group based on the month, finally we can use the avg or sum function
    to get the monthly average values.
    Detail information below for your reference:
    We can modify the query in the dataset to get the month value from the date:
    SELECT   Amount, Date, DATEPART(month, Date) AS Month
    FROM      TableName
    Add an row gorup of the month(Month)
    Use expression below to get the average value of the month and the sum of the month:
    Monthly Average: =Avg(Fields!Amount.Value,"Month")
    Monthly Sum :  =Sum(Fields!Amount.Value,"Month")
    If the amount value comes from another dataset using the lookup function, you can use expression below o get the monthly average:
    =Avg(Lookup(source_expression, destination_expression, result_expression, dataset),Month")
    preview like below:
    More details information about the LookUp function for your reference:
    https://technet.microsoft.com/en-us/library/ee210531(v=sql.110).aspx
    If your problem still exists, please try to provide us some sample data and more detail information about your requirements.
    Regards,
    Vicky Liu
    Vicky Liu
    TechNet Community Support

  • Lookup function issue or specific cell data binding problem

    I  have a dataset which has datatable having 2 columns i.e
    Table( Id string,Value string)
    Every single record in the datatable represents an answer to particular question, Id column being question identifier and Value column  being an answer and every question has answer being stored for 7 days.
    Now i have designed a report which is in the form of grid like
                         Day1 Answer, Day2 Answer, Day3 Answer............................Day7 Answer
    Question 1 
    Question 2
    .Question 40
    I tried using lookup function in ssrs reporting service to bind every single cell in the report using data from dataset like
    = Lookup("question_identifier",QuestionId.Value,AnswerValue.Value,"mydataset");
    The report is working absolutely fine in the report designer as expected but when i take it to the ASP.NET website where i have to generate it, it never shows up and i get report couldn't be found and make sure you have published the report kind of errors.
    I figured that this is the problem with lookup function because as soon as i removed all lookup function expressions in the report , the report started to show up but without data.
    Please let me know if there is another way to go around this problem or fix this issue.
    Thanks,
    BR,

    Hi Jolly,
    I don't think we need lookup function for this. We have only one dataset, the report can be easily created by simply modifying the query of the dataset and place those fields in the tablix report. Refer below example,
    create table reporttable(id int, value varchar(200))
    insert into reporttable values(1,'abc')
    insert into reporttable values(1,'abc1')
    insert into reporttable values(1,'abc2')
    insert into reporttable values(1,'abc3')
    insert into reporttable values(1,'abc4')
    insert into reporttable values(2,'abc')
    insert into reporttable values(2,'abc1')
    insert into reporttable values(2,'abc2')
    insert into reporttable values(2,'abc3')
    insert into reporttable values(2,'abc4')
    insert into reporttable values(3,'abc')
    insert into reporttable values(3,'abc1')
    insert into reporttable values(3,'abc2')
    insert into reporttable values(3,'abc3')
    insert into reporttable values(3,'abc4')
    select id as [Question],'Day ' + cast(row_number() over (partition by id order by id) as varchar) + ' Answer' as AnsCol
    from reporttable
    Regards, RSingh

  • Using Lookup

    Post Author: jeff.p18
    CA Forum: Data Integration
    Hello (mother-tongue = french)
    I'm a BODI beginner and I often have things lije this to code :
                SELECT gd.num_ecrou_ini, ae.dat_epreuve, ae.cod_diplome, u2018Ru2019, 2
                FROM gdet_det gd,
                atf_expertise ae,
                t_ods_w_diplome wde
                WHERE gd.num_ecro_cou = ae.num_ecro_cou
          AND gd.num_ecro_cou = (         SELECT max(gd2.num_ecro_cou)
                                                         FROM gdet_det gd2
                                                         WHERE gd2.num_ecro_ini = gd. num_ecro_ini   )
                AND gd.num_ecrou_ini not in (   SELECT wde2.num_ecrou_ini
                                       FROM t_ods_w_diplome wde2  )
                AND 2 < = (      SELECT min(hd2.priorite)
                                       FROM t_ods_h_diplome hd2
                                       WHERE hd2.num_ecrou_init = gd.num_ecrou_ini)
          AND gd.num_ecro_cou = (         SELECT max(ae2.dat_expertise)
                                                         FROM gdet_det ae2
                                                         WHERE ae2.num_ecro_cou = ae. num_ecro_cou  )
    I wonder if it is recommended to use lookup to implement it in BODI.
    Look at my where clause in BODI :
    GDET_DET_1.NUM_ECRO_COU = ATF_EXPERTISE_1.NUM_ECRO_COU ANDlookup_ext(&#91;ds_ods_info_penit.SCOTT.T_ODS_W_DIPLOME,'PRE_LOAD_CACHE','MAX'&#93;,    &#91;NUM_ECRO_INI&#93;,&#91;0&#93;,&#91;NUM_ECRO_INI,'=',GDET_DET_1.NUM_ECRO_INI&#93;) = 0 ANDlookup_ext(&#91;ds_ods_info_penit.SCOTT.T_ODS_H_DIPLOME,'PRE_LOAD_CACHE','MIN'&#93;,    &#91;PRIORITE&#93;,&#91;9&#93;,&#91;NUM_ECROU_INIT,'=',GDET_DET_1.NUM_ECRO_INI&#93;) >= 2 ANDlookup_ext(&#91;ds_source_gide_source.dbo.GDET_DET,'PRE_LOAD_CACHE','MAX'&#93;,   &#91;NUM_ECRO_COU&#93;,&#91;NULL&#93;,&#91;NUM_ECRO_INI,'=',GDET_DET_1.NUM_ECRO_INI&#93;) = GDET_DET_1.NUM_ECRO_COU ANDlookup_ext(&#91;ds_source_gide_source.dbo.ATF_EXPERTISE,'PRE_LOAD_CACHE','MAX'&#93;,   &#91;DAT_EXPERTISE&#93;,&#91;NULL&#93;,&#91;NUM_ECRO_COU,'=',GDET_DET_1.NUM_ECRO_COU&#93;) = ATF_EXPERTISE_1.DAT_EXPERTISE
    It is working but should i choose another way to do that ?
    subsidiary question : does BODI use Oracle analytical function to perform that ?
    Thanks in advance
    +

    Hi jimmy5495,
    According to your description, it seems like you don’t know how to correctly use Lookup function. Based on my research, Lookup function is not supported to be used in a single textbox that means outside Data Grid with multiple datasets environment. Because
    in a single textbox with multiple datasets environment, it only supports Aggregate functions when we want to use fields in it. While Aggregate functions are not allowed inside the Destination or Result expressions of a Lookup function.
    We can add the expression in a table textbox in the design surface, then delete the other cells. While if we want to add this expression in page header, since page header can only contain static items, I think we could achieve this goal in current release
    of Reporting Services.
    References:
    Aggregate Functions Reference (Report Builder and SSRS)
    Page Headers and Footers (Report Builder and SSRS)
    Regards,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • SSRS countrow Aggregate error(Aggregate and lookup functions cannot be used in query parameter expressions.)

    Below expression works fine with text box but gives error in dataset expression.
    ="SET FMTONLY OFF select  "+ join(Parameters!Column.Value,",") +" FROM pamcustom.dbo.vw_HFL_HFD_HotfileData INNER JOIN pamcustom.dbo.HFL_HFB_HotFileBatch  on BatchID = HFB_intBatchID where BatchID ="+Parameters!BatchId.Value+"
    and "+Parameters!cmbTranType.Value+" "+ iif(CountRows("DS_Aml_Mnr_Iss_Desc")=Parameters!Mnr_Iss_Desc.count," "," and aml_mnr_iss_desc in "+"('" & join(Parameters!Mnr_Iss_Desc.Value,"','")
    & "')")+iif(CountRows("ds_ReportingCategory")=Parameters!ReportingCategory.count," "," and ReportingCategory in "+"('" & join(Parameters!ReportingCategory.Value,"','") & "')")+iif(CountRows("ds_NAICSubGroup")=Parameters!NAICSubGroup.count,"
    "," and naicsubgroup in "+"('" & join(Parameters!NAICSubGroup.Value,"','") & "')")+iif(CountRows("ds_PortTrading")=Parameters!PortTrading.count," "," and porttrading in "+"('"
    & join(Parameters!PortTrading.Value,"','") & "')")+iif(CountRows("ds_GL_LE")=Parameters!GL_LE.count," "," and gl_le in "+"('" & join(Parameters!GL_LE.Value,"','") &
    "')")+iif(CountRows("ds_coagroup")=Parameters!cmbCoaGrp.count," "," and coagroup in "+"('" & join(Parameters!cmbCoaGrp.Value,"','") & "')")+iif(CountRows("Portfolio")=Parameters!cmbPort.count,"
    "," and portfolio in "+"('" & join(Parameters!cmbPort.Value,"','") & "')")+IIf(IsNothing(Parameters!txtSecID.Value)," "," and secid in ('"+Replace(Parameters!txtSecID.Value,",","','")+"')")+iif(IsNothing(Parameters!minPortFilter.Value)
    and IsNothing(Parameters!MinPort.Value)," "," and portfolio "+Parameters!minPortFilter.Value+Parameters!MinPort.Value)+iif(IsNothing(Parameters!maxPortFilter.Value) and IsNothing(Parameters!MaxPort.Value)," ","
    and portfolio "+Parameters!maxPortFilter.Value+Parameters!MaxPort.Value)+iif(IsNothing(Parameters!minCoaFilter.Value) and IsNothing(Parameters!txtMinCoa.Value)," "," and portfolio "+Parameters!minCoaFilter.Value+Parameters!txtMinCoa.Value)+iif(IsNothing(Parameters!maxCoaFilter.Value)
    and IsNothing(Parameters!txtMaxCoa.Value)," "," and portfolio "+Parameters!maxCoaFilter.Value+Parameters!txtMaxCoa.Value)
    I guess the error " Aggregate and lookup functions cannot be used in query parameter expressions." is because I am using CountRow to ensure that if all values of multi select all selected i will not use that filter in where clause.
    Pls. guide...

    Hi, Include your parameter total count in the dataset for parameter and instead of using countrows() function use the count from dataset in the expression.
    Hope this helps.........
    Ione

  • Can I use "dvt" function for customizing the chart format in OBIEE 11g?

    Hi,
    ".pcxml" file cannot be found in OBIEE11g. However, can I use "dvt" function for customization? If yes, how?
    Reference for dvt function:
    http://docs.oracle.com/cd/E23943_01/apirefs.1111/e12418/tagdoc/dvt_pieGraph.html

    Hello,
    I know it's possible, because i already found some blogs about changing the chart colors and turning off the animated graphs.
    <Graph visualEffects="NONE" animationDuration="0">
    But we want to alter more chart options, like make a bar chart default stacked. In 10G this was possible. I think this is also
    possible in 11G through the dvt-graph-skin.xml, but what i want to know is, is there a document that explains which tags you could use in this file.
    It would be great to get some help on this.

  • Difficulty in creating a chart by using a function with a returned value

    Hi,
    I am having a problem in using own function to create chart a with a returned value as the chart. If not using the returned value, it works fine.
    Is this a known issue?

    If you share some code, we might be able to help you.

  • Using the lookup function in Numbers '09

    I'm looking for the way to have the lookup function in Numbers '09 return an error for a non-exact match.  Eg. I want an invalid part number to state this, but currently all I can get is the return of data for the closest match.  Thank you.

    when you use the VLOOKUP() function the last, optional, argument can request and exact match.  When an exact match is not available VLOOKUP() will return an error.
    you can use the IFERROR() function to trap errors like this:
    =IFERROR(<FUNCTION_TO_TRY>, "NOT FOUND")
    In your case.... if <FUNCTION_TO_TRY> is you VLOOKUP(<WHAT_TO_FIND>, <RANGE>, <COLUMN>, 0), the "0" specifies exact match and you could then place all this in the IFERROR() like this:
    =IFERROR(VLOOKUP(<WHAT_TO_FIND>, <RANGE>, <COLUMN>, 0) "NOT FOUND")
    <WHAT_TO_FIND> is what to look for,
    <RANGE> is where to look,
    <COLUMN> is the number of the column in the range you want to return

  • Is there a way of getting LOOKUP function to return the address of a cell rather than the value?

    Hi
    I am wondering if there is a way of converting the value found in a LOOKUP function into a reference for the cell in question.
    I have constructed the following formula:
    =OFFSET(LOOKUP(A2,August :: $A),2,2)
    In an attempt to return the value of a cell which is two rows and two columns away from the cell returned by a LOOKUP function.
    But I am getting the error Argument 1 of OFFSET expects a reference but found "Name."
    Could someone advise?
    Thanks,
    Nick

    nick_harambee wrote:
    Hi
    I am wondering if there is a way of converting the value found in a LOOKUP function into a reference for the cell in question.
    I have constructed the following formula:
    =OFFSET(LOOKUP(A2,August :: $A),2,2)
    In an attempt to return the value of a cell which is two rows and two columns away from the cell returned by a LOOKUP function.
    But I am getting the error Argument 1 of OFFSET expects a reference but found "Name."
    Could someone advise?
    Thanks,
    Nick
    Nick,
    To find the row that a searched-for value is in, use MATCH.
    Jerry

  • Set multiple items with javascript function in chart link

    Hi Folks
    I am able to use the javascript $s function to set the value of one item from a chart link. I need to pass values to multiple items.
    Is there a way to use javascript function to pass values for multiple items on a page from a chart link
    Appreciate your responses
    Thanks
    Gopal

    Hi Arnau,
    You need to surround your JavaScript code like this (without the spaces before and after script):
    < script language="Javascript">
      window.open("<%=ABAP_VARIABLE%>").focus();
    </script >
    Regards,
    Patrick.

  • Essbase as a source in OBIEE 11g and using lookup to Relation database

    Hello All,
    We are trying to implement Essbase as primary source for our obiee 11g repository and using relational database as secondary source of data.
    I was using a lookup functionality in repository to lookup value from one of the Essbase's Dimension's attribute to relational database, however, there is error when testing this in OBIEE Dashboards.
    And tried to look this error in support.oracle and googled it but was not able to find anything on it.
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 43119] Query Failed: [nQSError: 46008] Internal error: File server\Query\Src\SQLookupUtility.cpp, line 145. (HY000)
    Have you had any such issue and how can we pass this issue?
    I am trying to find if there are any quick resolution before going to oracle support.
    TIA.
    Parish

    Is Essbase 11.1.1.3 supported as a source for OBIEE 11g?From the certification matrix (http://www.oracle.com/technetwork/middleware/bi-enterprise-edition/bi-11gr1certmatrix-166168.xls) we can see that only Essbase 9.3.3+ and 11.1.2+ are supported, not 11.1.1.3
    Paul

  • Using max function in PL/SQL

    VERY URGENT...
    Am new to oracle...
    I've written a package that display gif images in form of histogram/bar chart. using html,
    I need to use max function to display values proportionately.
    please help. i need to complete this assignment by 2/9/00 by 10.00 am at the latest. I've half written a function but I don't know if there's a simpler way fo doing this. html enabled

    First of all Thanks to all gentlemen who replied ..many thanks ...
    Tried the ROW_NUMBER() option but still it is taking time...have given output for the query and tkprof results as well. Even when it doesn't fetch any record ( this is a valid cased because the input header id doesn't have any workflow request submitted & hence no entry in the wf_items table)..then also see the time it has taken.
    Looked at the RANK & DENSE_RANK options which were suggested..but it is still taking time..
    Any further suggestions or ideas as to how this could be resolved..
    SELECT 'Y', 'Y', ITEM_KEY
    FROM
    ( SELECT ITEM_KEY, ROW_NUMBER() OVER(ORDER BY BEGIN_DATE DESC) RN FROM
    WF_ITEMS WHERE ITEM_TYPE = 'xxxxzzzz' AND ROOT_ACTIVITY = 'START_REQUESTS'
    AND SUBSTR(ITEM_KEY,1,INSTR(ITEM_KEY,'-') - 1) = :B1
    ) T WHERE RN <= 1
    call count cpu elapsed disk query current rows
    Parse 0 0.00 0.00 0 0 0 0
    Execute 1 0.00 1.57 0 0 0 0
    Fetch 1 8700.00 544968.73 8180 8185 0 0
    total 2 8700.00 544970.30 8180 8185 0 0
    many thanks

  • Dense Lookup Function in OBIEE

    Hi ,
    Can someone please explain the syntax of Dense Lookup Function in OBIEE.
    The function in the built-in RPD is using too many arguments and I am not able to understand it.
    Thanks in Advance for the help.
    Akshatha

    I had actually seen all those links. Thanks for your time although.
    Actually, I have an expression like this.
    lookup( DENSE LookupTable.DOMAIN_MEMBER_NAME, 'MCAT', 'CMP' || '~' || Table_A.TOP_LVL_PRODCAT_ID, VALUEOF(NQ_SESSION.USER_LANGUAGE_CODE), Table_A.DATASOURCE_NUM_ID)
    I am not sure of what 'MCAT' and 'CMP' is here?
    Is the || the concatenation operator?
    Can you please explain this expression?
    I hope I am not asking too much here :/
    Akshatha

  • Group by Lookup function result

    I have a report that uses two datasets.
    The first one looks like this. It's the time members have recorded under a particular job title:
    ParentId TaskName ObjectiveId MemberId JobTitle TimeSpent Status
    3174ED19 TEST 3 42AA79F6 23179C0F NULL 0.00 01
    3174ED19 TEST 3 42AA79F6 596CA495 JobTitle1 9.00 01
    3174ED19 TEST 1 AEE18C46 23179C0F NULL 0.00 01
    3174ED19 TEST 1 AEE18C46 596CA495 JobTitle2 3.00 01
    3174ED19 TEST 2 AEE18C46 23179C0F NULL 0.00 01
    3174ED19 TEST 2 AEE18C46 596CA495 6.00 01
    I need to show the records which have JobTitle == null with a particular Job Title, the current one they have in Active Directory. So I use another dataset from a WCF service:
    MemberId Name JobTitle
    23179C0F Member1 JobTitle1
    Then I use a lookup function to show the correct Job Title:
    =IIF(IsNothing(Fields!JobTitle.Value) OR Fields!JobTitle.Value = "",lookup(Fields!MemberId.Value,Fields!MemberId.Value,Fields!JobTitle.Value,"Members"),Fields!JobTitle.Value)
    This works ok. The problem is that I need the data to be grouped by several fields, including the Job Title. It seems grouping happens before the lookup function is executed, so instead of grouping the NULL values along with the fields that contains the actual
    values, I end up with two groups with the same Job Title, one containing the null values and another with the actual values.
    Is there any workaround for this?
    Thanks.

    Hi EXR88,
    Per my understanding that you have add some row group in the report to group the result which include the JobTitle from the table1 and also group by the field which result comes from the lookup funtion, now the issue is the group by the Lookup function result
    isn't correct, right?
    I have tested on my local envoronment and can't reproduce the issue, please find the details information below to make sure you have done the correct setting:
    I tried to create the two tables like below:
    Table1:
     Have the same recores as you provided above.
    Table2:
    MemberId    Name      JobTitle
    23179C0F   Member1    JobTitle1
    596CA495   Member1      NULL
    After adding the LookUP function, i got the report like below:
    I add two row group base on the JobTitle(JobTitle) and the Lookup functiuon result(Lookupfunctiongroup), the Lookupfunctiongroup row group is the child group of the JobTitle like below, please make sure you have add the expression with the lookupfunction
    in the group on:
    If i have some misunderstanding, please try to provide the expectted group by  result you want to get and also the currectly result you have got.
    Any problem, please feel free to ask.
    Regards,
    Vicky Liu
    Vicky Liu
    TechNet Community Support

Maybe you are looking for

  • Why won't Front Row recognize DV movie files??

    Hi, I've placed several DV movie files in my 'Movies' folder and Front Row doesn't seem to find them. If I save the files as an MOV file, front row sees them instantly, but a) it doubles the file size and b) I shouldn't have to do that. The first Int

  • 3602E won't connect to 5508 WLAN

    Hi all, This is a lab system that I'm just building out- I try to see the obvious but it does bite me occasionally.  I have a 5508 WLC running release 7.4.1.  My AP's are all Cisco 3602E's with the AC modules.  My problem is that the Access points ca

  • Photoshop element 10 failed installation

    I just bought photoshop element 10 for mac and windows, but when i insert the cd can't install it my computer is readung it as a blank disc. Help I have a mac with os Lion Au secours je n'arrive pas à installer Adobe Photoshop element 10 que je viens

  • Stuck ctrl key

    Hello I have recently bought a Pavilion dv6-1329tx entertainment notebook, and recently I have been having problems with the keyboard. The computer is acting as though the ctrl key is continuously being held, so whenever i press a key it activates a

  • CS4 onto iMac? Help!

    I bought CS4 a while back-probably 5 years ago.  I had it on my iMac that is only a year or so old.  I had to erase my computer and start over and now can't figure out how to get photoshop back on my computer.  I have the disks but obviously can't pu