OBIEE 10g - Logical column with static value
I created a logical column with static numeric value in it and added it to presentation layer. The column is not showing up in Answers. All other columns I added are showing up. The issue is with this one only.
I have verified permissions on this column in presentation layer. I tried reloading server metadata in answers, restarting all services but it didn't help.
One thing I noticed this column is showing fx icon instead of Σ icon.
Kid,
The fx means it is a calculated column/formula and the sigma means that you've added some aggregation type to the column.
Either way it shouldn't matter and your column should be showing up.
I would attempt to create a new column and in the fx field try entering static text and see if that allows the column to be visible after dragging it to the presentation layer subject area.
Also what is the value that you are adding?
Similar Messages
-
Draw Dynamic Column with Static Columns
Hi All
I have to show dynamic columns with static columns including column header and I am choosing the Cross Tab style. I have done this already in SSRS but failed to do in Crystal Report version (Crystal Report Basic for Visual Studio 2008).
Name Hair Color City Age Mobile Email
Jannie Brown Dublin 15 +353 122 1234567 Email Address
John Black Dublin 20 +353 145 1234567 Email Address
Dynamic Columns
Name , Hair Color , City Age
Static Column
Mobile, Email
I also face empty rows in cross tab report.
Please help and give me a chance of thanks.Thank you very much for your kind response. Actually i have dynamic Store Procedure results based on parameters and yes static column will never changed
Store Procedure Result
Mobile Age Email Key Value
+3531221234567 15 Email Address Name Jannie
+3531221234567 15 Email Address Hair Color Brown
+3531221234567 15 Email Address City Dublin
+3531451234567 20 Email Address Name John
+3531451234567 20 Email Address Hair Color Black
+3531451234567 20 Email Address City Dublin
And I want to draw report in following style
Name Hair Color City Age Mobile Email
Jannie Brown Dublin 15 +3531221234567 Email Address
John Black Dublin 20 +3531451234567 Email Address -
Possible to simulate a spreadsheet for input, with static values per row
Haven't seen this done but thought I'd ask, is it possible to simulate a spreadsheet interface in Apex? Basically, I have 9 columns each of which needs to be filled out for 10 time periods per day (row), and it's easiest for the user to tab across the columns then down to a new row / next timeslot, to fill out the whole day's worth of data, rather than entering hour by hour & then changing the timeslot manually. This would require that the value for column 1 of row 1 = 8, column 1 of row 2 = 9, column 1 of row 3 = 10 and so on. So, a tabular form but with static values on each row.
Is this possible & if so, any pointers to what to start researching to make this work would be greatly appreciated. I know they can work in a spreadsheet & upoad it and we may go that way but this seemed like an interesting problem to see if Apex could handle it; I just am uncertain where to start on it is all.
Many thanks for your pointers!
gp
Edited by: 834058 on Jul 18, 2011 10:37 AMTabular report, with some modifications to have rows added at start of usage. User would on occasion need to click a control to add rows..
Thank you,
Tony Miller
Webster, TX
There are two kinds of pedestrians -- the quick and the dead.
If this question is answered, please mark the thread as closed and assign points where earned.. -
Sql query slowness due to rank and columns with null values:
Sql query slowness due to rank and columns with null values:
I have the following table in database with around 10 millions records:
Declaration:
create table PropertyOwners (
[Key] int not null primary key,
PropertyKey int not null,
BoughtDate DateTime,
OwnerKey int null,
GroupKey int null
go
[Key] is primary key and combination of PropertyKey, BoughtDate, OwnerKey and GroupKey is unique.
With the following index:
CREATE NONCLUSTERED INDEX [IX_PropertyOwners] ON [dbo].[PropertyOwners]
[PropertyKey] ASC,
[BoughtDate] DESC,
[OwnerKey] DESC,
[GroupKey] DESC
go
Description of the case:
For single BoughtDate one property can belong to multiple owners or single group, for single record there can either be OwnerKey or GroupKey but not both so one of them will be null for each record. I am trying to retrieve the data from the table using
following query for the OwnerKey. If there are same property rows for owners and group at the same time than the rows having OwnerKey with be preferred, that is why I am using "OwnerKey desc" in Rank function.
declare @ownerKey int = 40000
select PropertyKey, BoughtDate, OwnerKey, GroupKey
from (
select PropertyKey, BoughtDate, OwnerKey, GroupKey,
RANK() over (partition by PropertyKey order by BoughtDate desc, OwnerKey desc, GroupKey desc) as [Rank]
from PropertyOwners
) as result
where result.[Rank]=1 and result.[OwnerKey]=@ownerKey
It is taking 2-3 seconds to get the records which is too slow, similar time it is taking as I try to get the records using the GroupKey. But when I tried to get the records for the PropertyKey with the same query, it is executing in 10 milliseconds.
May be the slowness is due to as OwnerKey/GroupKey in the table can be null and sql server in unable to index it. I have also tried to use the Indexed view to pre ranked them but I can't use it in my query as Rank function is not supported in indexed
view.
Please note this table is updated once a day and using Sql Server 2008 R2. Any help will be greatly appreciated.create table #result (PropertyKey int not null, BoughtDate datetime, OwnerKey int null, GroupKey int null, [Rank] int not null)Create index idx ON #result(OwnerKey ,rnk)
insert into #result(PropertyKey, BoughtDate, OwnerKey, GroupKey, [Rank])
select PropertyKey, BoughtDate, OwnerKey, GroupKey,
RANK() over (partition by PropertyKey order by BoughtDate desc, OwnerKey desc, GroupKey desc) as [Rank]
from PropertyOwners
go
declare @ownerKey int = 1
select PropertyKey, BoughtDate, OwnerKey, GroupKey
from #result as result
where result.[Rank]=1
and result.[OwnerKey]=@ownerKey
go
Best Regards,Uri Dimant SQL Server MVP,
http://sqlblog.com/blogs/uri_dimant/
MS SQL optimization: MS SQL Development and Optimization
MS SQL Consulting:
Large scale of database and data cleansing
Remote DBA Services:
Improves MS SQL Database Performance
SQL Server Integration Services:
Business Intelligence -
Update column with ROW_NUMBER() value
I have a column that I would like to update with a ROW_NUMBER() value partitioned by a specific column.
CREATE TABLE ##tmp (id INT NULL,
value1 VARCHAR(10),
value2 VARCHAR(10))
INSERT INTO ##tmp (value1,
value2)
VALUES ('A', 'asdfasdf'),
('A', 'asdf'),
('A', 'VC'),
('B', 'aasdf'),
('C', 'sdfgs'),
('C', 'xdfbhsdty'),
('C', '23sdgfg'),
('C', '234')
-- update the ID column with the values below
SELECT ROW_NUMBER() OVER (PARTITION BY Value1 ORDER BY Value2),
Value1,
Value2
FROM ##tmp
I have 14 million records. Can someone explain the best way to do this? Does the ORDER BY destroy performance for this many records?
Thanks!CREATE TABLE ##tmp (id INT NULL,
value1 VARCHAR(10),
value2 VARCHAR(10))
INSERT INTO ##tmp (value1,
value2)
VALUES ('A', 'asdfasdf'),
('A', 'asdf'),
('A', 'VC'),
('B', 'aasdf'),
('C', 'sdfgs'),
('C', 'xdfbhsdty'),
('C', '23sdgfg'),
('C', '234')
-- update the ID column with the values below
; with cte as (
SELECT ROW_NUMBER() OVER (PARTITION BY Value1 ORDER BY Value2) as RowNumber,
Value1,
Value2
FROM ##tmp
update cte
set Id = RowNumber;
Russel Loski, MCT, MCSE Data Platform/Business Intelligence. Twitter: @sqlmovers; blog: www.sqlmovers.com -
Create a logical column with more than one data source
I'm having a problem to create a logical column with more than one data source in Siebel 7.8.
What I want to do is the union of 2 physical tables in one logical table.
For example, I have a "local_clients" table and a "abroad_clients" table. What I want is to have a logical table "clients" with the client data from the 2 tables.
What I've tried is dragging the datasources I need onto the logical column.
However this isn't working because it only retrieves the data from the first data source.Hi!
I think it is not possible to do this just by dragging the columns to the logical table. A logical table can have more than one source, but I think each column must have just one direct source column.
I'm not sure, but maybe you should do the UNION SQL to get the data of the two tables. In the physical layer, when you create a new physical table, it's possible to set the "table type" as a "SELECT". I didn't try that, but it seems that it's possible to have the union table in the physical layer.
Bye.
Message was edited by:
user578388 -
Document library view: Group by a column with multiple values
I have a document library which has a managed metadata column.
I would like to create a view which groups the documents by this managed metadata column.
The managed metadata column can have multiple values.
I know that this is not possible with SharePoint's group by, since it only accepts those columns which can have only one single value.
But is this possible to accomplish by some other means, e.g. Content query web part? Or is there perhaps a 3rd party solution to this?
Is it possible to change the group by settings somehow to allow Group by to function with columns with multiple values? <- this may be far fetched...Hi Pekch,
I'm assuming you have VS2010 to build the custom web part. From there you will need to figure out the following:
Get a SPList object for the Document Library (See below for code example)
Loop through all the documents in the SPList object
If you have audience targetting enabled, then you'll need to determine if the user has access to the document by checking the "Target_x0020_Audiences" column)
As you also want to group by metadata, you'll need to populate 2 datatables (one table with a column containing unique metadata values and another table with a metadata column and other document related columns). Link these two tables via a dataset
relation.
Set the dataset as the datasource for a repeater, add in some css and javascript for the group expand/collaspe and it should be close to what you need.
This will be a time consuming task if you don't know where to start or have problems figuring out how to perform a certain operation. So you may want to determine if the functionality you want is required or just a "nice to have". Good
luck and if I have some spare time, I'll create a blog post outlining how to do all the above.
I got the below code from a sharepoint blog sometime in the past and you can use it to retrieve a list.
You can use it like this: GetListByUrl(http://servername/Shared%20Documents/Forms/AllItems.aspx)
using Microsoft.SharePoint;
public SPList GetListByUrl(string listURL)
SPList list = null;
try
using (SPSite site = new SPSite(listURL))
if (site != null)
// Strip off the site url, leaving the rest
// We'll use this to open the web
string webUrl = listURL.Substring(site.Url.Length);
// Strip off anything after /forms/
int formsPos = webUrl.IndexOf("/forms/", 0, StringComparison.InvariantCultureIgnoreCase);
if (formsPos >= 0)
webUrl = webUrl.Substring(0, webUrl.LastIndexOf('/', formsPos));
// Strip off anything after /lists/
int listPos = webUrl.IndexOf("/lists/", 0, StringComparison.InvariantCultureIgnoreCase);
if (listPos >= 0)
// Must be a custom list
// Strip off anything after /lists/
webUrl = webUrl.Substring(0, webUrl.LastIndexOf('/', listPos));
else
// No lists, must be a document library.
// Strip off the document library name
webUrl = webUrl.Substring(0, webUrl.LastIndexOf('/'));
// Get the web site
using (SPWeb web = site.OpenWeb(webUrl))
if (web != null)
// Initialize the web (avoids COM exceptions)
string title = web.Title;
// Strip off the relative list Url
// Form the full path to the list
//string relativelistURL = listURL.Substring(web.Url.Length);
//string url = SPUrlUtility.CombineUrl(web.Url, relativelistURL);
// Get the list
list = web.GetList(listURL);
catch { }
return list; -
To overcome column with null value-urgent
hai all,
when i query i get column with null value.
how to solve it?
thank in advance.
rcs
SQL> DESC SCOTT.CB1;
Name Null? Type
ID NUMBER
SUPCODE NUMBER
SUPLNAME VARCHAR2(100)
NAME VARCHAR2(100)
ITEMCODE VARCHAR2(10)
RECDOC NUMBER
RECDATE VARCHAR2(10)
TOTVALUE NUMBER
QTY NUMBER
CB_IPNO NUMBER
CB_VNNO NUMBER
CB_VDT VARCHAR2(10)
CB_AMT NUMBER
RECDOC_GR VARCHAR2(30)
RECDATE_GR DATE
SUPCODE_GR VARCHAR2(10)
TABLE LOOK LIKE THIS (NOT ALL DATA IN SAME ROW, BECUSE I INSERTED LAST 3 COLUMN VALUES):
ID SUPCODE SUPLNAME NAME ITEMCODE RECDOC RECDATE TOTVALUE QTY CB_IPNO CB_VNNO CB_VDT CB_AMT RECDOC_GR RECDATE_GR SUPCODE_GR
2015 AAAA 04117 9083 10545.6 78
2016 BBBB 04609 9087 25200 3600
2017 GGGG 04609 9088 28175 4025
2018 36591371.64 2565017.27
00001/07-08 02/04/2007 14020362
00002/07-08 02/04/2007 14020362
00003/07-08 02/04/2007 14010254
00004/07-08 02/04/2007 14010254
00005/07-08 02/04/2007 14021458
SQL> SELECT DISTINCT ID, SUPCODE_GR, NAME, ITEMCODE, RECDOC, RECDATE_GR, TOTVALUE, QTY FROM SCOTT.CB
1;
ID SUPCODE_GR
NAME
ITEMCODE RECDOC RECDATE_G TOTVALUE QTY
1
PRO.AT.ALU.POWDER UNCOATED
04609 15 51975 7425
2
PEN, GEL PEN
07969 17 154 11
ID SUPCODE_GR
I NEED RESULT AS FOLLOWS (ALL RESPECTIVE DDATA IN ONE LINE NOW NOT LIKE THAT):
ID SUPCODE SUPLNAME NAME ITEMCODE RECDOC RECDATE TOTVALUE QTY CB_IPNO CB_VNNO CB_VDT CB_AMT RECDOC_GR RECDATE_GR SUPCODE_GR
2015 AAAA 04117 9083 10545.6 78 00001/07-08 02/04/2007 14020362
============Even accounting for the formatting, I'm not sure I even understand the question. It could be any number of different problems or non-problems.
-
Display values for logical columns with several physical sources
Hi all,
I'm enocuntering some strange behaviour with the values displayed for a column (when we want to add it a as a filter, and in the dialogue box select 'Show All' values).
Basically the logical column is mapped against several physical columns as the base fact table is aggregated to different levels. Additionally, one column in the fact tables has an attribute value, and these vary between the aggregated and non-aggregated table. This is not a problem.
In the production environment, when we display the all values in the filters prompt for this column we are seeing the values being taken from one fact table. Naturally this means that not all the values possible for this column are being shown (i.e. values from the aggregated fact tables are missing). Now in one of our test environment where those fact tabels have additional data loaded, the values are being taken from one of the other fact tables. Unfortunately it is not necessarily the fact table with less data.
My questions are:
a) What dictates which fact table the server will use when the query in Answers doesnt use any dimensions (i.e. we are selecting just this attribute and selecting all the possible values by which it can be filtered)?
b) Is there a way of obtaining all the values from the differente physical columns? I.e. that the display values shows the values of that logical column across all the physical fact tables? Maybe we would need to model that attribute as a logical dimension just for that attribute? Im not really sure this would work, as at the physical level the join between the dimension and fact would still have to go to only one particular fact table.
Any info or help is much appreciated.Hi,
Aggregate tables exist at physical level and are created by ETL procedures. Although i am aware that the dimension come into play when the application needs to decide which source aggregate table to use, it is not an issue here as in our query we are not involving dimensions. We are selecting just this one columen, and then the filter option on this column, then in the dialogue box we select 'All Choices', only the values from one of the source tables is being shown.
This is not a probelm within reports, i think it is a product limitation in that in that option to list all values a user can filter by, it is not possible to display all the values from the different fact tables to which that column is mapped.
Has anyone else encountered this behaviour? -
Derived logical column using Row values in OBIEE11g
Hi Experts
I have a requirement whereby I need to create say 100 new logical column in obiee using the row values of one dimension.
For eg. say I have dimension values like A and B in one of the table , I need to create logical columns like C=A+B and D = A/B and E = AxB as such when the user drags this to the analysis the calculation should happen automatically.
The problem is they are in the rows and not the coulmn , so I can't do plain calculation like sales per Unit = Sales/Units - as Sales and Units are two differnet measure column.
How to achieve this in RPD.
RegdsHi
Pls. find below the examples :
You have a dimesion called KPI which has soem KPIs.
KPI Measure Values
KPI1 10
KPI2 20
KPI3 50
etc
Now I need to calulate a driven KPI i.e KPI10 which is KPI10 = KPI2/KPI3 , and I need to do that in RPD.
I know I can do it in Front end analaytics by using Pivot or Selection steps . But I want to do it in RPD.
Regds -
How to take the Average of a DATEDIFF column with NULL values?
I am building an SSRS report that can display the average of a calculated datediff column in dd/hh/mm format with the following formula:
=Avg(IIF(Fields!LastCorrectedDate.Value is nothing,0, DATEDIFF("n",cdate(Fields!LastCorrectedDate.Value),cdate(Fields!
LastSignDate.Value)) \(60*24) & ":" & DATEDIFF("n",cdate(Fields!LastCorrectedDate.Value),cdate(Fields!
LastSignDate.Value)) mod (60*24)\60 & ":" & DATEDIFF("n",cdate(Fields!LastCorrectedDate.Value),cdate(Fields!
LastSignDate.Value)) mod (60*24) - (((DATEDIFF("n",cdate(Fields!LastCorrectedDate.Value),cdate(Fields!
LastSignDate.Value)) mod (60*24))\60)*60) ))
SSRS does not raise any errors with the formula and I have used the same formula for other columns without issue. I have noticed that this column includes null values which I think may be the problem. When the reports runs, it returns #ERROR on the column
but does not give a reason why. I am using SSRS report builder with visual basic logic as opposed to embedding SQL. Any help or feedback would be greatly appreciated.Hi No Ragrets,
According to your description, you want to calculate the average for the date time difference. Right?
In Reporting Services, Avg() function is only available for numeric values. In this scenario, the DateDiff() function to calculate the minutes difference will return a number. So we can do average calculation based on the return values first. Then we format
it as a time. We have tested this case in our local environment. Please try the following expression:
=floor(avg(DateDiff("n",Fields!StartDate.Value,Fields!EndDate.Value))) \(24*60) &":"&
floor(avg(DateDiff("n",Fields!StartDate.Value,Fields!EndDate.Value))/60 mod 24 )&":"&
floor(avg(DateDiff("n",Fields!StartDate.Value,Fields!EndDate.Value))) mod 60
The result looks like below:
If you have any question, please feel free to ask.
Best Regards,
Simon Hou -
ORA-01400 - not null column with default value and item with authorization
I've searched - I would think someone has run into this. APEX 3.0.0.00.20 - I've created a simple form on a table. One of the column is a not null column with a default value. I have a select list on that item, but it has security on it - authorization scheme. So, it checks the user and if that user isn't of the right role, it will not even display that item. However, APEX appears to still send in the column in its sql! So, the default value is useless, it sends in null each time. Even if I set the default at the Item level, I get null. Argg. That's got to be a bug...
In debug, I do not see the item listed at all. It's not used. That's fine - but why is it trying to insert the value? I would think it would leave it off??? I think because the item is associated with a database column. But, getting around this is ugly. Having to create a hidden item for each one, and then check to see if I need to take the list value... horrible. Any way to get around this???I should add - I guess I can always put my own custom process in to replace the DML. Just seems like a simple thing - if the value doesn't appear on the debug, isn't set with any default value... don't include it in the DML.
-
Evaluate function doesn't work with Static values
Hi All,
I have been trying to call a evaluate function and have been successfully in calling it..but i face problem when i pass any static values to it...
For eg
when i try calling the function using one of the columns...it works fine
Evaluate('dbo.Hello(%1)',"Dim table_name"."Department" )
the function normally changes it to upper case.so i get all the value in the column in department in upper case.
but when i call any static value like
Evaluate('dbo.Hello(%1)','hello') it throws the following error..
[nQSError: 43113] Message returned from OBIS. [nQSError: 43119] Query Failed: [nQSError: 42015] Cannot function ship the following expression: Evaluate( dbo.Hello(%1),'hello') . (HY000)
Can any one please help me in this
Regards
SKWhich version of Jdev are you using? What are the results you are getting?
-
Pre-populating a date/time column with the value entered in the last added item
I have a list with a column called "expected finish date". Whenever the user adds the very first item in a list, he/she should have to enter a value for this column.
I want to make all new item entries to pre-poplate this field with the value entered in the previously added item. This way, he/she wont have to re-enter the date every time (which rarely changes). How can this be done?could create a second list ("state") with column ("default finish date")...
create a workflow on main list... if column is blank/empty, pull from second list... otherwise, update second list with the value that was entered.
Or, customize the form (InfoPath or JavaScript)
Scott Brickey
MCTS, MCPD, MCITP
www.sbrickey.com
Strategic Data Systems - for all your SharePoint needs -
How to Add column with default value in compress table.
Hi ,
while trying to add column to compressed table with default value i am getting error.
Even i tried no compress command on table still its giivg error that add/drop not allowed on compressed table.
Can anyone help me in this .
Thanks.Aman wrote:
while trying to add column to compressed table with default value i am getting error.This is clearly explain in the Oracle doc :
"+You cannot add a column with a default value to a compressed table or to a partitioned table containing any compressed partition, unless you first disable compression for the table or partition+"
http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_3001.htm#sthref5163
Nicolas.
Maybe you are looking for
-
I lost my phone and used the iphone locater to find it. Now that it has been returned to me, it is disabled and says connect to ITUNES. Can you help me ?
-
How do i set up a itunes account without a credit card
how do i set up a itunes account without a credit card? I'm in Canada and it does not give me the "none" option.
-
Delete entries in "Installed Updates" log
Is there anyway to delete entries in the "Installed software updates" log? I want to reinstall a firmware patch but although the patch downloads and says it has installed successfully it doesn't actually update anything... However, it shows up in the
-
I have a team site collection and I want to add a new App of type Issue Tracking list. so I did the following:- From the site collection I created a new App of type issue tracking. Then from the site collection I created a new Content type named "Cus
-
Preferred Hardware Plattform for Linux RAC Cluster
What ist the preferred Hardware Platform for using LINUX with Oracle RAC - Cluster solution ? What do you prefer Suse or Redhat ? Is there a tested Hardware Environment from Oracle Support ? Thanks