Matching a filter value with mutiple fact columns
Hello,
I have been given following requirement to implement in OBIEE dashboard. There is a dimension table which stores Sales Rep IDs and their names. Fact table stores the Sales opportunities identified by these sales reps. Now they can work on the opportunity in any role...say as consultant or primary rep or some other role. Lets call it Role1, Role2 and Role3. The requirement is when user selects a Sales rep name in the filter; the dashboard should show all those opportunities on which he worked in any of the capacities i.e.Role1 or 2 or 3.
My Fact table has following columns
Role1_Sales_Rep_ID
Role2_Sales_Rep_ID
Role3_Sales_Rep_ID
The Dimension has
Sales_Rep_ID
Sales_rep_Name
I tries putting following condition ion physical layer join
Dim.Sales_Rep_ID = fact.Role1_Sales_Rep_ID
Or Dim.Sales_Rep_ID = fact.Role2_Sales_Rep_ID
Or Dim.Sales_Rep_ID = fact.Role3_Sales_Rep_ID
but the RPD gives an error saying that Dim.Sale_Rep_ID used more than once. Please help me solve this scenarion or please suggest any alternate solution.
Thanks,
Vivek.
Hi vivek,
but the RPD gives an error saying that Dim.Sale_Rep_ID used more than once. Please help me solve this scenarion or please suggest any alternate solution. Ya the joins should be established correctly to achieve your scenerio,i.e here oneto many joins sud be established for example
take the three fact tables role1,role2,role3 and the dimension table first click the dimension table and join it to role1 so it becomes 1:N the same way again click dimension table and click the role2 and repeat the process then you can achieve what you want.
Another simpler work around is take all the fact tables into single folder/table and the important columns for your requirment.Then now 1 fact and 1 dimension so its simple for you.
Hope it helps you.
Best Wishes,
Kranthi.
Similar Messages
-
Assigning a DataProvider filter value with JavaScript
I have a "Fiscal Yr/Period" filter characteristic in my web application that I am assigning the value of the current month and year when the web application is loaded. In other words, this filter is applied to the DataProvider when the application loads (code below):
<object>
<param name="OWNER" value="SAP_BW"/>
<param name="CMD" value="SET_DATA_PROVIDER"/>
<param name="NAME" value="C_LPR_Q018"/>
<param name="QUERY" value="C_LPR_Q018"/>
<param name="INFOCUBE" value="ZPP_C01"/>
<param name='FILTER_IOBJNM' value='0FISCPER'/>
<param name='FILTER_VALUE' value='H12004010'/>
DATA_PROVIDER: C_LPR_Q018
</object>
As you can see above, the value for the '0FISCPER' object is hardcoded and thus requires me to change this monthly. I have written some JavaScript code to calculate the current mo. and yr. however I can't get my JavaScript variable that holds the value I need assigned to the FILTER VALUE. Can I even assign a JavaScript variable as the filter value? Is there another way? Any help would be greatly appreciated.Hi Allen,
if you want to change any param of an object, try the function SAPBWOpenURL, which should be sent against the object you want to change. Documentation is at :
http://help.sap.com/saphelp_bw33/helpdata/en/f1/0a5a2ee09411d2acb90000e829fbfe/frameset.htm -> Business Explorer ->
Web Application ... -> Befehl URLs
Concat the date in JavaScript and call
SAPBWOpenURL(SAP_BW_URL_Get()+'&item=...&FILTER_IOBJNM="0FISCPER"&FILTER_VALUE="TheDateYouWant"') (I hope I set the " and ' correctly, better you should check).
For example you can insert :
<HEAD>
<script>
function callTheTableWithTheDate()
SAPBWOpenURL(like above);
</script>
</HEAD>
<BODY onload="JavaScript:callTheTableWithTheDate()">
It's only a hint, adjust it for your requirements. You can save the date in a cookie too and reuse it whenever you want. You know how to handle cookies ?
Bye
Ralf -
Hello there
I have a table called phone_shop_tab
ID MODEL CHANNEL
001 NOKIAn95 3g
002 % gsm
003 nokian97 %
004 nokian97 gsm
005 % %
006 % 3g
i have to select all from phone_shop_Tab if i pass
MODEL= <value> and CHANNEL = <value>
Here % is any values
I should get the output with the follwing constraints
% denots any value passed . for example % in the MODEL column means that it is OK for any MODEL value passed to the query.
if i fliter with MODEL= 'NOKIAn97' and CHANNEL = 'gsm' it should select 4th row because it exacly matches the filer
if i fliter with MODEL= 'NOKIAn97' and CHANNEL = 'XXX' it should select 3th row because it matches model (nokian97) also channel (%) here XXX= %
if i fliter with MODEL= 'BAC' and CHANNEL = '3g' it should select 6th row because it matches model (%) also channel (3g) ,here BAC = %
if i fliter with MODEL= 'ABC' and CHANNEL = 'XYZ' which are both not in the table it should select 5th row because it matches model (%) also channel (%) because % mean any value
hope you all understand the output scinario
can anyone provide with an SQL statment for this.
thanks
prashHi,
This does what you requested:
SELECT *
FROM phone_shop_tab
WHERE UPPER (:p_model) LIKE UPPER (model)
AND UPPER (:p_channel) LIKE UPPER (channel)
;You said, for example:
if i fliter with MODEL= 'NOKIAn97' and CHANNEL = 'gsm' it should select 4th row because it exacly matches the filerIf :p_model='NOKIAn97' and :p_channel='gsm', this will indeed returrn the row where id=004. It will also return the rows where id IN (002, 005).
If you meant that it should only return the best match (however you define "best"), then use the analytic RANK (or perhaps ROW_NUMBER) fucntion to arrange the rows found in "best first" order, then pick the ones labeled 1.
For example:
WITH all_matches AS
SELECT p.*
, RANK () OVER ( ORDER BY CASE WHEN model = '%' THEN 2 ELSE 1 END
, CASE WHEN channel = '%' THEN 2 ELSE 1 END
) AS rnum
FROM phone_shop_tab p
WHERE UPPER (:p_model) LIKE UPPER (model)
AND UPPER (:p_channel) LIKE UPPER (channel)
SELECT * -- or list all columns except rnum
FROM all_matches
WHERE rnum = 1
; -
Comparison of multiple column values with a single column value
I have two separate tables say Tab1 and Tab2
I want to select some datas , which is common to both the tables.
In tab1 , there is a column 'STATE' and it's value is 'A'
In tab2, there are multiple columns for the state, say STATE_A,STATE_B, STATE_C ETC and a row is present with the following details
STATE_A = 1, STATE_B =1 ,STATE_C =0,STATE_D=1
I need to select STATE when STATE_A ='1',
if my STATE='B', this STATE has to be selected since STATE_B =' 1', similraly
if my STATE='D', this STATE has to be selected since STATE_D =' 1',
If my STATE='C', STATE_C should not get selected since it's '0'.
Is it possible to do this in a single SELECT statement, where I have some other checks also or else how can I achieve it?Maybe this will help
Select * from STATE_MAS ;
STATE
A
B
D
F
H
Select * from STATE_CHILD
STATE_A STATE_B STATE_C STATE_D STATE_E STATE_F STATE_G STATE_H STATE_I STATE_J
1 0 0 1 1 0 0 0 0 0
CREATE OR REPLACE FUNCTION GET_STATE (P_VAL VARCHAR) RETURN NUMBER IS
V_SQL VARCHAR2(200);
V_COL VARCHAR2(35);
P_RETURN NUMBER ;
BEGIN
V_COL := 'STATE_'||P_VAL;
V_SQL := 'SELECT 1 FROM STATE_CHILD WHERE '||V_COL||' = 1 ';
EXECUTE IMMEDIATE V_SQL INTO P_RETURN ;
RETURN P_RETURN ;
END;
SELECT STATE FROM STATE_MAS
WHERE GET_STATE(STATE) = 1 ;
STATE
A
D -
Waiting in XI and matching an outgoing value with an incoming response
Does anyone know how to "wait" in a normal XI interface? I need to send data to a bank and retain the sum value. Then wait for them to respond and see if the values match. If they match I do nothing - If they don't I send an email.
Thanks!
Andrewhi,
many ways to achieve that:
- you can send a message with a BPM (and wait for correlated value)
but it involves the use of a BPM + don't know how long you need to wait
- with the first flow you can also store the value of the sum + some identifier
and just check if with the bank's reponse with another flow
faster as no BPM involved
Regards,
michal
<a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a> -
Filter issues with hidden/visible columns on a table
OK, 1st post to this forum:
This is based on:
http://labs.adobe.com/technologies/spry/samples/data_region/SpryPagedViewSample.html
I have a contact list that has contact info on it (office
phone, home phone, cell phone, etc). There are several hundred
entries in the .xml file. As a default, I am putting the contacts
in a table that has the office phone and email address visible, and
the other info hidden. I have a "ShowDetail" checkbox that will
allow the hidden columns to be visible and vice versa by using the
addClassName and removeClassName.
The issue I have, is that when you start typing in an contact
name when the checkbox is checked, the table flashes the correct
info up with the columns visible, but then the HTML is rendered and
the Hidden class is reassigned to the columns.
Is there anyway to run the javascript function that toggles
the class after the HTML is rendered based on the checked status of
the checkbox? Thanks for any help!Thanks for the reponse. However here is the syntax I need to edit
SELECT u.user# as "UID",
lower(u.name) as owner,
lower(t.name) as table_name,
col.col# as column_id,
lower(col.name) as column_name,
decode(col.type#,
1, 'varchar2',
2, decode(col.scale,
null, decode(col.precision#, null, 'number', 'float'),
'number'),
8, 'long',
9, 'varchar',
12, 'date',
23, 'raw',
24, 'long raw',
69, 'rowid',
96,'char',
105, 'mlslabel',
106, 'mlslabel',
'undefined') as data_type, /* these decodes come from the view */
/* definition for DBA_TAB_COLUMNS */
/* in CATALOG.SQL for version 7.3 */
/* the next two decodes are derived from the actual queries performed by Storage */
/* when Manager retrieving column information. */
decode(nvl(col.precision#, 0),
0, col.length,
nvl(col.precision#,0)) as data_length,
to_number(decode(nvl(col.precision#, 0),
0, null,
decode(col.type#,
2, nvl(col.scale,-127/*MAXSB1MINAL*/),
0) ) ) as scale,
decode(col.null$, 1, 'n', null) as nulls,
'y' as in_primary_key
FROM sys.col$ col,
sys.obj$ t,
sys.user$ u
WHERE u.user# = t.owner# /* user$ will be the driving table because no index on user# */
AND t.obj# = col.obj#
AND u.name = 'POWERSELLER' /* We only care about PowerSeller tables/columns; */
AND t.type# in (2, 4) /* Tables and views only */
AND EXISTS (SELECT 1
FROM sys.ccol$ ns_ccol,
sys.cdef$ ns_cdef,
sys.obj$ ns_t,
sys.user$ ns_u
WHERE ns_u.user# = ns_t.owner#
AND ns_t.obj# = ns_cdef.obj#
AND ns_cdef.con# = ns_ccol.con#
AND ns_u.name = 'POWERSELLER'
AND ns_cdef.type# = 2 /* primary key constraint */
AND ns_cdef.enabled is not null
AND ns_ccol.obj# = t.obj# /* using ns_ccol instead of ns_t */
/* does 70% as many logical reads */
AND ns_ccol.col# = col.col#
) -
With 'Revenue' Fact Column how can i calculate 'Previous 3 Months Revevue'
Hi All ,
i have a Column Called Revenue from Fact Table. i need to calculate Previous 3 Months Revevue
How can i achive this ? please help me
Thanks in advanceHi,
Create one new logical coloumn bmm layer and
1.Check Use existing logical columns as the source
2.Click the Expression Builder button (three dots) to open the Expression Builder
3.Select Functions > Time Series Functions > Ago.
by using this u can create 3 months year ago revenue coloumn and use this coloumn in your formula
hope this will help for you
Naresh -
Repository Subject Area with mutiple Facts that share a dimension
Hi,
I have repository model that has 2 fact tables that share a dimension. I'm trying to pull information from both fact tables and this dimension but get this error:
Error Code :OPR4ONWY:U9IM8TAC:OI2DL65P
None of the fact tables are compatible with the query request Club Products.Product Price. (HY000)
Thanks and RegardsIt stands for Logical Table Source (LTS). See OBI Server Administration Guide manual.
-
Matching user selection value with xml statements
I'm fairly new to the Spry framework and I'm trying to
accomplish a simple project with it and struggling. Can anyone give
me some direction or suggest some samples to look at?
I'm creating a survey and I've generated a radio button list
that will appear with each statement in my xml. I could write a
general javascript function that captures the value and totals it,
but it is a little more complex than that and that's where I'm
stuck.
Each statement has a career type associated with it (which
I've stuck in the code, but will hide it later). I want to get the
value of the user's checked radio button and then add it to a
variable based on the career type? How do I get that career type
and associate it with the user's choice? Do I need to put a
function in "onclick" and set it as the current row?
my html:
<head>
<script type="text/javascript"
src="assets/includes/xpath.js"></script>
<script type="text/javascript"
src="assets/includes/SpryData.js"></script>
<script type="text/javascript">
var jSurvey = new Spry.Data.XMLDataSet("survey1.xml",
"survey");
var jStatement = new Spry.Data.XMLDataSet("survey1.xml",
"survey/question");
function getValue(){
</script>
</head>
<body>
<p spry:region="jSurvey"
class="header">{jSurvey::surveyTitle}</p>
<form name="scale">
<table>
<tr>
<th scope="col">Statements</th>
</tr>
<tr>
<td><div spry:region="jStatement"><p
spry:repeat="jStatement"
class="{ds_EvenOddRow}">{jStatement::statement}<br
/><br />
<span class="">{jStatement::careerType}</span>
<input type="radio" name="option_{ds_RowID}"
id="{ds_RowID}" value="0" onclick=" " >Dislike</input>
<input type="radio" name="option_{ds_RowID}"
id="{ds_RowID}" value="1" onclick=" ">Uncertain</input>
<input type="radio" name="option_{ds_RowID}"
id="{ds_RowID}" value="2" onclick=" ">Like</input>
<input type="radio" name="option_{ds_RowID}"
id="{ds_RowID}" value="3" onclick=" ">Like Very
Much</input></p></div>
</td>
</tr>
</table>
<input type="submit" />
</form>
</body>
my xml:
<survey>
<question>
<statement>Use dental instruments within patient's
mouth.</statement>
<careerType>Dental Hygienist</careerType>
</question>
</survey>
Any direction or samples I should look at would help.
thanks, BrandyHi Brandy,
I would try writing out my radios like this:
<input type="radio" name="option_{ds_RowID}"
id="{ds_RowID}" value="0"
onclick="AddAnswer('{jStatement::careerType}', this.value); " />
And then define a function that tracks the answers by career
type:
var answers = {}; //. Associative array that will track our
answers by career type.
function AddAnswer(careerType, value)
answers[careerType] = value;
By the way, I see you doing something like this:
<input ...> ... </input>
Input elements aren't supposed to contain anything. That's
why in my example I used:
<input ... />
--== Kin ==-- -
WAD - Exclude more than one value with filter button
Hi guys
I have been working on a web template with a button to set a filter to exclude two values. E.g. I want to exclude both the values '28' and '30' from the dataprovider.
What I have done is insert a button group item, create a button with the command SET_SELECTION_STATE_SIMPLE to exclude '28' as command 1 and SET_SELECTION_STATE_SIMPLE to exclude '30' as command 2. This does however not give me the correct result, as it only excludes '30' as set in command 2. So the conclusion must be that SET_SELECTION_STATE_SIMPLE can not be used, as it will only work with one value.
So I went on and tried with SET_SELECTION_STATE which gives the possibility to choose more than one filter value. However it does not seem possible to exclude values with this command?
Is it not possible to exclude two filter values with a button in a BI 7.x web template?
BR
Stefan.Dear Frank
I did it as like as the following link lead me:
http://www.oracle.com/technology/obe/obe11jdev/11/adfbc_new_features/adfbc.html
The problem has been appeared when I attached the "Create" button and when press on it to create new record, then the "LOV" couldn't work correctly.
Thanks for your reply -
Changing Filter Values from Macro in BW 7.0
Hello,
in my Workbook I need to change Filter Values of some queries in runtime.
The first thing I found was BEx API reference for BW 3.5, but I wasn't able to make these functions work. After all I found this code:
Dim BEx As Object
Set BEx = Application.Run("BExAnalyzer.xla!GetBEx")
Dim dp As Object
Set dp = BEx.DataProviders.Item(sDP)
Dim dimension As Object
Set dimension = dp.Request.Dimensions.Item("0CALDAY")
Dim filters As Object
Set filters = dimension.filters
If Not BEx.ServerStateExists Then
MsgBox " Please refresh before using this Makro"
Exit Function
End If
Call filters.SetFilterValue(sFilter) 'this sets the filter value
But using this code I wasn't able to set more than 1 filter value, because the function SetFilterValue removes all previous filters, but now I need to set more than 1 filters.
I also tried to separate different filter values with comma, but this did not help.
Also I will be glad if someone could give me a link on documentation about BEx objects in Excel.
Thanks in advance,
Pavel BaronovHi.........
Check this........
http://www.netsaptech.com/SDN/demo/BIM301.pdf
Regards,
Debjani....... -
Filter column value with special characters
HI,
I have a table table1 with a varchar column column1 having a value(ASW'JK'TH)(the column value itself has special charater'').Please help me with a quwery to filter this value
Regards
ASwathydb version is 11g:
in_identifer VARCHAR2 (200) := q'[RM'2007'29]';
I need where condition for a tabel coumn with teh above value -
Passing filter values from column formula in OBIEE 10g
Hi,
I am trying to pass filter value from the column LY Spend YTD columns where we have a filter option and passing the year filter 2013 as below.
FILTER("Fact - Purchasing - Invoice"."LY Spend YTD" USING (Time."Year" = '2013'))
My goal behind doing this is, we have a filter already present for the whole criteria on the year which is 2012.
But specifically for this column i dont want to pass the year 2012 to it, Instead I want to pass 2013 to it. But I am not succeding the result is blank.
Please suggest and let me know if further understanding is needed.Hi Srini
Thanks for you reply.
I cannot do that way because some measures are satisfying with year 2012 and displaying the data and other measure are satisfying with 2013.
I am working on LY Spend YTD, LY spend YTD - 1, Spend YTD and Year ago spend.
So thats the reason I have thought that way of passing the filter in column formula irrespective of criteria filter.
Please suggest. -
We have some columns being added to a table. We have set the sortProperty and the filterProperty on each of our columns.
This allows us to both filter and sort.
We want to be able to access the columns filter value and sort value after the fact. Can we access the table and then the columns and then a columns properties to find these two items? How can I access the sort direction and filter value of columns?
We would also like to store the filter value and the sort direction, and re-apply them to the grid if they have been set in the past. How can we dynamically set the filter value and sort direction of a column?
Can I catch or view the 'filtered' or 'sorted' event? We would like to look at the event that occurs when someone sorts or filters a column. Where can I see this event or where can i tie into it, without overwriting the base function?Hey everyone,
Just wanted to share how I implemented this:
Attach a sort event handler to table - statusReportTable.attachSort(SortEventHandler);
In this event handler, grab the sort order and sorted column name then set cookies with this info
function SortEventHandler(eventData)
var sortOrder = eventData.mParameters.sortOrder;
var columnName = eventData.mParameters.column.mProperties.sortProperty;
SetCookie(sortDirectionCookieName, sortOrder, tenYears);
SetCookie(sortedColumnCookieName, columnName, tenYears);
Added sortProperty and filterProperty to each column definition:
sortProperty: "ColName", filterProperty: "ColName",
When i fill the grid with data, i check my cookies to see if a value exists, and if so we apply this sort:
function FindAndSortColumnByName(columnName, sortDirection (true or false))
var columns = sap.ui.getCore().byId('statusReportTable').getColumns();
var columnCount = columns.length;
for(var i = 0; i < columnCount; i ++)
if(columns[i].mProperties.sortProperty == columnName)
columns[i].sort(sortDirection); -
Library Filters: Filter for multiple values in a single column and Wildcards
If you have a multi-value column in a library, can you filter to show only results where two (or more) specific values (terms) are applied? E.g. Year 2014 and Month January? Seems this would be particularly useful for Enterprise Keywords columns.
Similarly, is there any way to filter on one value OR another value in a single column (e.g. Document Type Memo OR Fax)?
Any way to use wildcards in searches (would be REALLY useful in the Title and Name columns when naming conventions have been followed).
I'm guessing the answer is going to be 'move to SharePoint 2013' - if that is the case, please confirm whether all the scenarios mentioned above are catered for.Thanks for your replies !
Is there any other way to achieve this ?
There is 1 InfoObject which has 2 fields Employee and Department.
Employee Department
001 A
001 B
001 C
In the report there should be 1 row for Employee 001 with all the Departments displayed in the same cell separated by commas.
Can this be done in the backend through a ABAP code?
Maybe you are looking for
-
Can we replace OracleSytemUser with a custom user in ldap?
HI, We have installed soa 11g and configured Microsoft AD as ldap provider. I have couple of questions around this. 1. Can we remove the default embedded authenticator totally? If yes what are the things we should keep in mind? 2. We don't want hard
-
Append control image requires vi to be open
Having a curious problem with the append control image vi in the report toolkit. I'm using LV8.6 with the current report toolkit . I have an application that merges the information from 4 sections into one html report. Using the append control image
-
Upgrade issue in phase PREP_IMPORT/TOOLIMP_TOOLDEL_PRE were negative
Hello Team, Got hanged at the phase PREP_IMPORT/TOOLIMP_TOOLDEL_PRE were negative,. Error: Checks after phase PREP_IMPORT/TOOLIMP_TOOLDEL_PRE were negative! Last error code set: Detected 1 aborted activities in 'PHASES.ELG'<br/> Calling 'D:\usr\sap\X
-
I forgot my password and ipod will not sync with new computer
I forgot my password and ipod will not sync with new computer
-
HI, Now, I am developing an automation plugin, and want to create a modal dialog, which I still can interact with document when the dialog is show. I find photoshop has some modal dialog have this function, such as the dialog of Customize Pro