PowerPivot 2013 | Drill to Details returns all rows
When double-clicking on a measure, or a value within a powerpivot pivot table, the drill to details sheet returns all the rows in the dataset.
Is this normal behavior? Is there a workaround for this?
Thank you!
The drillthrough should respect all filter context in the pivot table, thus it should only be returning those values that make up the subset determined by the table filters, slicers, and whichever field labels make up the row and column filters.
Any filtering logic you have written into the measures themselves will not be maintained for the drillthrough.
Similar Messages
-
Query to return ALL rows even those with zero counts
Hi,
The following query will return only those rows that have a non zero count value:
select c.id, a.name, count(*) as XYZ from CON c, CUST a
where c.help !='1' and (c.id = a.id) group by c.id, a.name order by c.id;
The results are:
1 ME 3
3 YOU 4
What i want is to return all rows in CUST and the count, XYZ, that correspond to each row in CUST that matches the whare condition above, even if the count is zero.
ie
1 ME 3
2 WE 0
3 YOU 4
Can this be done?You may want to get the counts then do the outer join. If you simply count with an outer join you will get 1 for 'WE' because there is a row in the cust table with 'WE'. This may work for you;
with
cust as (
select 1 id, 'ME' name from dual union all
select 2 id, 'YOU' name from dual union all
select 3 id, 'WE' name from dual),
con as (
select 1 id, '2' help from dual union all
select 1 id, '2' help from dual union all
select 1 id, '2' help from dual union all
select 2 id, '2' help from dual union all
select 2 id, '2' help from dual union all
select 2 id, '2' help from dual union all
select 2 id, '2' help from dual)
-- end of test data
select a.id, a.name, nvl(c.cnt,0) xyz
from cust a,
(select id, help, count(*) cnt
from con
where help !='1'
group by id, help) c
where a.id = c.id(+) -
I have a table (basically the same setup in the various dynamic security in tabular blogs) where the table contains WindowsUserName stored as domain\username.
I have a Row Filter on the table: SecurityTable has a filter of =SecurityTable[WindowsUserName]=USERNAME()
When a user connects to the tabular model AND their name is matched in one of the rows they return JUST the rows with their match. Which makes sense.
However, if a user connects and their Windows user name is NOT in a row in that table....they return ALL rows???
That makes no sense to me.
It behaves almost as if it is doing a check and if it DOESN'T find a match it just returns all values.
What am I missing?
--------------EDIT-----------
Found the issue: that use was (unknown to me) a domain admin, so... admin rights trump all :)Resolved:
User had admin rights, didn't realize this at the time. -
Business Objects is not returning all rows from Query
We set the rowcount to 1000000 and the business objects query only returns 16,960 rows. We then uncheck the limit for the rowcount and the first run of the query returns 65,535. The subsequent run of the query returns all the rows which is greater than 65,535. We are on release 6.1A of business objects and selecting from Microsoft SQLServer 2005 in 2000 compatablility mode. We noticed that the rowcount being sent to SQLServer is replacing the set number with the 65,535 the first time the query is sent and subsiquent queries have the correct rowcount set. What would be causing the rowcount to be reset and how can it be fixed?
We set the rowcount to 1000000 and the business objects query only returns 16,960 rows. We then uncheck the limit for the rowcount and the first run of the query returns 65,535. The subsequent run of the query returns all the rows which is greater than 65,535. We are on release 6.1A of business objects and selecting from Microsoft SQLServer 2005 in 2000 compatablility mode. We noticed that the rowcount being sent to SQLServer is replacing the set number with the 65,535 the first time the query is sent and subsiquent queries have the correct rowcount set. What would be causing the rowcount to be reset and how can it be fixed?
-
Regular Report Not Returning All Rows
Greetings,
On APEX version 4.1.1.00.23 Using latest versions of Chrome and IE. I found some threads that discussed this aspect some, but not to the extent that is helpful to my situation.
I know it is crazy to have APEX return 40K+ rows on a report, but I have a need to do so. I need to return that many rows from a table so that an APEX page can be opened via Excel and then have an Excel macro run over the report results and import all 40K+ rows into a worksheet. As I said, that's crazy, but the decision isn't mine. :-) We have the macro working and it passes parameters to the APEX page and imports data from the APEX page.
Also, the report has 14 columns on it, not that many.
Given the requirement above I have a regular report page that only has the report and 2 page items on it. The page items contain values that are passed via Excel and are then used in the WHERE condition of the report. Using the same WHERE condition, when I run the SQL for the report outside of APEX it returns 46,840 rows. I have the both the Number of Rows and Maximum Row Count settings set to 50000. And, I have the Pagination Scheme set to Row Ranges X to Y of Z (with pagination).
When I run the page and enter the selection criteria the report only returns 15,500 rows. Yes, that's a lot rows. And, it takes about 5 minutes to populate. But, it doesn't return ALL of the rows. Also, the pagination suggests that all rows were returned because it reads - row(s) 1 to 15500 of 15500. I have changed the pagination and max rows settings a lot to see of it's just a matter of having the correct report setting. I've yet to find a setting that will cause the whole 46840 result set to be returned.
It may end up that the report selection needs to change in order to return fewer rows. But, regardless of that why isn't APEX returning the complete result set now? And, is there a way to force it to return the complete result set regardless of the size?
Any suggestions are appreciated.
Thanks, Tonycloaked wrote:
Thanks for the response. Yup, you're correct. Downloading to a CSV might be better. I've set reports up that way many, many times. I have even developed pages that import from a CSV into APEX using PL/SQL, years before it was an APEX feature. I initially set the report up to allow it to be downloaded, but the user doesn't want it to work that way.
The worksheet will be used by a lot of people in our accounting department and they want the process to be as simple as possible. Right now Excel opens up the APEX page, logs into the application, passes parameters to it for the month and company, hits the Select button, waits on the report to build, then automatically imports it, and finally closes the page. It is quite slick. Yes, it takes 5 minutes to run, but the user is OK with that given what the automation provides.
So, in order for the automated import to work properly all 45K rows need to display on one page, without pagination. I currently have pagination on the page simply to determine if APEX is returning all of the rows.A process of this nature might work better using an export: XML or export: CSV report template, which won't go anywhere near pagination. When a page containing a report using these templates is requested APEX sends the report results in XML or CSV format rather than rendering the page. This should be faster, avoid complications with pagination, and be easier to parse in Excel.
Previous thread along similar lines: +{thread:id=2285213}+ -
I finally need to turn to the forum after trying for a few days to resolve my problem I decide to turn to the Oracle people for help.
The following code below does two things:
1. If I have the get_menu_label in side of it's own loop it never returns
2. If I take the get_menu_label out side of it's own loop it returns but does not return all the data.
DECLARE
-- GETTING THE DATABASE NAME
CURSOR get_db_name
IS
SELECT DATABASE
FROM uaf_mfgp_menus_and_groups_vm
GROUP BY DATABASE
ORDER BY DATABASE ASC;
-- GETTING THE OBJECT_ID FOR EACH DATABASE
CURSOR get_object_id_db (l_db_name VARCHAR2)
IS
SELECT object_id
FROM UAF_FORM_OBJECTS
WHERE object_label_2 = l_db_name;
-- GETTING THE GROUP NAME
CURSOR get_gp_name
IS
SELECT group_name
FROM uaf_mfgp_menus_and_groups_vm
GROUP BY group_name
ORDER BY group_name ASC;
-- GETTING THE OBJECT_ID FOR GROUP WITH GP NAME AND DATABASE
CURSOR get_object_id_gp (l_gp_name VARCHAR2, db_id NUMBER)
IS
SELECT object_id
FROM UAF_FORM_OBJECTS
WHERE object_label_2 = l_gp_name AND parent_object_id = db_id;
-- GETTING MENU LABEL
CURSOR get_menu_label (l_db_name VARCHAR2, l_gp_name VARCHAR2)
IS
SELECT menu_label
FROM uaf_mfgp_menus_and_groups_vm
WHERE DATABASE = l_db_name AND group_name = l_gp_name;
got_object_id_db NUMBER (20);
got_object_id_gp NUMBER (20);
got_db VARCHAR2 (100);
got_menu_label VARCHAR2 (200);
BEGIN
FOR c1 IN get_db_name
LOOP
FOR c2 IN get_gp_name
LOOP
OPEN get_object_id_db (c1.DATABASE);
FETCH get_object_id_db
INTO got_object_id_db;
OPEN get_object_id_gp (c2.group_name, got_object_id_db);
FETCH get_object_id_gp
INTO got_object_id_gp;
CLOSE get_object_id_db;
CLOSE get_object_id_gp;
OPEN get_menu_label (c1.DATABASE, c2.group_name);
LOOP
FETCH get_menu_label
INTO got_menu_label;
END LOOP;
CLOSE get_menu_label;
DBMS_OUTPUT.put_line ( 'GP_OBJECT_ID= '
|| got_object_id_gp
|| ' '
|| 'MENU_LABEL= '
|| got_menu_label
END LOOP;
END LOOP;
END;
/Javier, this the wrong way to use PL/SQL. Oracle SQL can do all this for you using JOINs.
This code, even if it did work, would be terrible slow - unable to scale with data volumes.
This code breaks a few fundamental Oracle rules:
- row-by-row processing using PL/SQL
- huge number of context swicthes per PL/SQL loop iteration
- not maximizing SQL and minimizing PL/SQL
I suggest you trash this code and write a SQL JOIN instead. -
Stored Procedure fails to return all rows of data.
Our HR database uses a procedure to build a list of employee IDs (ie. 1,3,14,...1210,1215) then calls a procedure to with a variable to extract details per employee. Unfortunately the list is 947 ids, however only 887 rows are returned.
As a test I split the list in two and called the procedure. If I add the data rows together I get 947, hence I know the employees are valid. Can anyone suggest why a long list of Ids should fail? Is there a limit a stored procedure can return?
The procedure (simplified down a bit) is:
ALTER PROCEDURE [dbo].[sp_Employee_CreateTable]
@EmpIds varchar(4000)
AS
SELECT E.empid as EmpId ,E.Surname
FROM Employee E
WHERE (E.[EmpID] IN (select * from GetAllUsersUnderManager(@EmpIds))) AND EJ.id=dbo.GetCurrentEmployeeJobRecord(EJ.empid)--EJ.dateto IS NULL
I can run the procedure as:
"exec sp_Employee_CreateTable @EmpIds=N'1,3,14.....999'" which returns (say) 700 rows and "exec sp_Employee_CreateTable @EmpIds=N'1001,.....1215'" which returns 247 rows. (ie. 700+247 = 947 which is correct.
But exec sp_Employee_CreateTable @EmpIds=N'1,3,14......1215' only returns 887 rows.
I have looked at the length of the data passed to the procedure (1,3,...1215) which equals 4126 chars, therefore I bumped the varchar space from 4,000 to 6,000 which is still within limits, however the number of rows returned was still 887.
Any help would be gratefully received.Hi Scott. I run the script you suggested (thank you), the var EmpIds was set to a string with over 930 ids. The returned data set started with 0 but only had 888 rows. As mentioned above I refer the 930+ list as full list, and the 888 as the short list.
The difference (around 47) were the last values in the full list.
Although EmpIds was set to 6K it definately seems like it gets to around 4K chars then ignores any other values.
Re "since you pass....". Absolutely. I have modified the Employee_CreateTable with the var update to 6K/
ALTER PROCEDURE [dbo].[sp_Employee_CreateTable]
@EmpIds varchar(6000),
@IncludeLeavers Bit
AS
SELECT E.empid as EmpId ,E.Surname, E.Firstname as Forename,E.PayrollID, E.intextno as Extension, EJ.position as Position, [dbo].[GetEmployeeDepartment](E.empid) as Department, [dbo].[GetEmployeeLocation](E.empid) as Location,
E.title as Title, EJ.ReportsTo,
CoEmail,E.[left]
FROM Employee E INNER JOIN EmployeeJobs EJ
ON E.empid = EJ.empid
WHERE (E.[EmpID] IN (select * from GetAllUsersUnderManager(@EmpIds))) AND EJ.id=dbo.GetCurrentEmployeeJobRecord(EJ.empid)--EJ.dateto IS NULL
AND (E.[left]=0 or E.[left]=@IncludeLeavers)
ORDER BY E.Surname, E.Firstname, E.empid -
URGENT : Return all rows when parameters null
Hi !
I have a simple question for you guys.
I have some problems creating an SQL.
Effectively, I want to be able to return all the rows of a table when my parameters are null.
Here is an example of what I'm saying.
SELECT COPY_TRANSACTION.DATE_TRANSACTION,
COPY_TRANSACTION.CODE_NT,
COPY_TRANSACTION.NOM_GROUPE,
COPY_TRANSACTION.NOM_PROVENANCE,
COPY_TRANSACTION.NOM_SUJET,
COPY_TRANSACTION.NOM_ACTION,
COPY_TRANSACTION.NOM_SOURCE,
COPY_TRANSACTION.NOM_SYSTEME,
COPY_TRANSACTION.VOLUME
FROM GESTACHE_OWNER.COPY_TRANSACTION COPY_TRANSACTION
WHERE (COPY_TRANSACTION.DATE_TRANSACTION Between ? And ?)
AND (COPY_TRANSACTION.PEIN_CREATION=?)
AND (COPY_TRANSACTION.CODE_NT In (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
AND )I want that when ? is null, every data of my table will be selected.
Anyone can help me ??Not pretty but you could try:
SELECT CT.DATE_TRANSACTION,
CT.CODE_NT,
CT.NOM_GROUPE,
CT.NOM_PROVENANCE,
CT.NOM_SUJET,
CT.NOM_ACTION,
CT.NOM_SOURCE,
CT.NOM_SYSTEME,
CT.VOLUME
FROM GESTACHE_OWNER.COPY_TRANSACTION CT
WHERE ( ( ?1 is null
and ?2 is null
and ?n is null)
or ( CT.DATE_TRANSACTION Between ?1 And ?2
AND CT.PEIN_CREATION=?3
AND CT.CODE_NT In (?4,?5,?6,?7,?8,...?n)
AND )How is this being called - a procedure, script, form? Depending on the use it might be beter to have 2 queries - one for NULL parameters, and one for the non-NULL parameters -
Pagination do not have choice of returning all rows
I have apex 3.0. When report is built, I normally give pagination scheme "Row Rnages 1-15 16-30 in select list (with pagination)", Number of Rows 15, Maxium Row count 2000. Problems are
1. Can not have "all rows" as select list choice ? (OEM grid has that choice)
2. Cna not change from 15 per page to other number
Can some export help ?Even changing number of rows will not change it. But really the question is to mix pagination and no pagination into ONE select list. I have been asked several times from users and I am puzzled about this myself.
Any expert there ? -
OSqlStmt cannot return all rows?
I'm wondering if there's any way to do this.
I want to be able to issue a SELECT statement, and:
(a) be able to cancel it at anytime
(b) set the fetch limit on the SELECT
Now, (a) makes me want to use OSqlStmt, and that works fine, as far a canceling goes. The problem is, OSqlStmt doesn't seem to support the concept of "fetch limit". It always seems to return the first row only, which makes sense considering it should only be used for DML.
Of course, (a) rules out ODynaset - there's no way to cancel them once they've started.
So, is there some trick to doing this? Thanks.Not if multiple bonuses exists of 5k, since he only wants the most recent one. Right?
Edit: I think this works, using analytics:
with t as (
select 1 id, 500 bonus, sysdate dte from dual UNION ALL
select 1 id, 100 bonus, sysdate-1 dte from dual UNION ALL
select 1 id, 5000 bonus, sysdate-2 dte from dual UNION ALL
select 1 id, 2000 bonus, sysdate-3 dte from dual UNION ALL
select 1 id, 5000 bonus, sysdate-4 dte from dual
select id, bonus, dte from (
select t.*,
SUM(case when bonus = 5000 then bonus end) over (partition by id order by dte desc) m
from t
order by id, dte desc)
where m is NULL or (bonus = 5000 AND m = 5000);
ID BONUS DTE
1 500 13-FEB-09
1 100 12-FEB-09
1 5000 11-FEB-09
3 rows selectedEdited by: tk-7381344 on Feb 13, 2009 2:49 PM -
How to return all rows with duplicate values? Inner join not working!
I have a 3 column table:
location (pk), name, size
I am attempting to select pairs of entries that have the same
name and size but different values for location (it is the
primary key.) My inner join does not seem to return what I need:
select a.location, a.name, a.size, b.location, b.name, b.size
from mytable a, mytable b where a.name = b.name and a.size =
b.size and a.location <> b.location;One solution is like this:
SELECT dname, loc, deptno
FROM dept
WHERE (dname, loc) IN
(SELECT dname, loc
FROM dept
GROUP BY dname, loc
HAVING COUNT (*) > 1
ORDER BY dname, loc, deptno
Regards
Zlatko Sirotic -
Cannot get all rows from cfProcResult
We upgraded one of our servers (A) from CF 6 to 7.02. Another
server (B) has CF 7.01.
On server B (CF 7.01) the code works (below), all rows of
each dataset are returned.
Now on server A (CF 7.02) all of the resulting datasets have
only the first record in them. If I add maxrows="-1" to each of the
cfProcResult tags there is no change. If I change that to
maxrows="100" then I can get the rows up to 100.
Is this a bug or is there a different means to return all
rows?It think its a bug. I got the same results under MX 7.0.2.
The topic of maxrows recently came up on another thread. I
did some searching and according to TechNote 18339 there was a
change with maxrow
"<cfquery maxrows=N> bug. ColdFusion MX (until ColdFusion
MX 7.0.1 CHF2) didn't pass maxrows to the underlying driver
(statement.setMaxRows())"
Given the results you're getting, it sounds like CF is
applying the maxrow to all of the resultsets, not just the one
where maxrows was declared. I suspect cfstoredproc's usage of
statement.setMaxRows() is incorrect. Thats just a guess though.
Bottom line, I think you'll need handle it manually.
Personally, I would recommend placing the row count logic in the
stored procedure (if possible). The overall results will be more
consistent and you won't have to worry about this kind of issue
again.
http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_18339
http://livedocs.adobe.com/coldfusion/7/htmldocs/00000314.htm
http://www.remotesynthesis.com/blog/index.cfm/2006/3/23/Maxrows-Issue-in-CFQuery -
Returning Multiple Rows From DBAdapter Calling PL/SQL Procedure
Oracle XE 10g Express Edition
JDeveloper 11.1.1.2.0
WebLogic Server 11g
Guys,
I have a table of orders, which I need to interrogate, and pass back any matching rows which meet certain criteria (e.g. status = 'OPEN').
However, rather than create a DBAdapter using an Operation Type of "Peform an Operation on a Table/Select", I need to use an Operation Type of "Call a Stored Procedure or Function".
I therefore need the procedure to return all the matching rows, rather than a single row.
I have looked at declaring return parameters for the procedure of the following types:
RECORD - is good because it allows me to return the elements of the row with their correct datatypes, but does not meet my needs because it will only support the return of a single row.
VARRAY - good because it can contain many row elements, but not good because it only supports a single row return, and also because all elements of the VARRAY must be of the same data type.
TABLE - good because it can contain many rows, but bad because each row can contain only two elements - the index element and the data element.
I think I could first define a RECORD (to hold a row), and then define a TABLE, with the data element being the RECORD, but I have found JDeveloper very fussy indeed when dealing with 'non-standard' data types in the DBAdapter.
Apologies if I am missing something obvious, but can anyone suggest a way of doing this?
Many thanks in advance.
Edited by: user2541290 on 17-Feb-2010 02:48Hi, I've been able to create process that seems to work. My platform is a but different but I don't think this is important for your question.
Here is the PL/SQL code. Just make Db Adapter for Calling stored procedure and it returns all rows!
Be aware of possible limitations on how manyrows you could return in one select! This can have severe impact on performance.
Succes.
Jos Baan
CREATE OR REPLACE PACKAGE lab2_multiple_rows IS
-- Author : 801455
-- Created : 18-2-2010 8:05:52
-- Purpose :
-- Public type declarations
TYPE rrows IS RECORD(
mutdat DATE,
opmerking VARCHAR2(20));
TYPE trows IS TABLE OF rrows INDEX BY BINARY_INTEGER;
-- Public constant declarations
-- Public variable declarations
-- Public function and procedure declarations
FUNCTION retrows RETURN trows;
END lab2_multiple_rows;
CREATE OR REPLACE PACKAGE BODY lab2_multiple_rows IS
-- Private type declarations
-- Private constant declarations
-- Private variable declarations
-- Function and procedure implementations
FUNCTION retrows RETURN trows IS
lrows trows;
lidx binary_integer := 1;
BEGIN
FOR rsql IN (SELECT t.* FROM jba_transactions t ORDER BY t.mutdat)
LOOP
lrows(lidx).mutdat := rsql.mutdat;
lrows(lidx).opmerking := rsql.opmerking;
lidx := lidx + 1;
END LOOP;
RETURN(lrows);
END;
BEGIN
-- Initialization
NULL;
END lab2_multiple_rows;
Edited by: Baan, Jos on 18-feb-2010 8:53 -
Hi guys,
I have the following situation:
Table_A
ID NUMBER
NAME VARCHAR2(10)
TABLE_B
ID_B
NAME_B VARCHAR2(10)
By mistake I did the following query:
Select *
from table_a
where id in (select ID from table_b);
My question is: Why the query return all rows from TABLE_A if in the inner select (select ID...) I'm didn't write any of the columns that exist on TABLE_B.?
Hope this is clear.!.
thanks in advance.select *
from table_a
where id in (select ID from table_b);The subquery will attempt to resolve the column named "ID" first within the subquery itself, then (if it doesn't find it) in the parent query. Since there is no ID column in table_b, the query actually becomes something like
select *
from table_a a
where a.id in (select a.id from table_b);
in other words
select *
from table_a
where id = id
which is equivalent to
select *
from table_a
where id IS NOT NULL
HTH -
XL Reporter Parameter that returns all data if not used
Is there a way to use a parameter on a field, but if the user doesn't select a value, return all rows? I have a report that returns a bunch of data about items. I would like one report where if the use chooses to narrow it down to a specific item they can, but if they choose not to narrow it down, it would return all items. I can only get it to do one or the other, but not both in one report.
ThanksI have a parameter setup for the ItemCode and I tried to assign it * for its default value, but it returns nothing. If I enter a valid item code it works, but it seems as if I put an * in, it looks specifically for that rather than treating it like a wildcard. If I remove the parameter and put the *, it returns all. I want the parameter available, but if they don't want to use it I would like to return all records.
Maybe you are looking for
-
My ipod wont work with my ihome anymore plz help
my ipod sounds fine with the headphones and with other speakers, but as soon as i put it on my ihome it wont work, yet it still will charge on there it just wont play music. plz help!
-
Ipod nano not showing up on Itunes - PLEASE HELP!
I recently had a problem with my nano 4 GB so I restored it to its original factory settings. Now when I plug it in to the computer it shows up in My COmputer but NOT in Itunes. I tried the troubleshooting techniques on the apple ipod suppport page f
-
Visibility of purchase order costs in sales order
We are a make-to-order sales and manufacturing organisation. Most of our products are manufactured in-house but some are procured externally. Where we manufacture products in-house we are able to see the costs in the EK02 condition type within the sa
-
Hi, I am experiencing trouble to saving a) pdfs that I have created myself with a scanner and b) pdfs that have been sent to me as mail attachments to iCloud! Anybody know a solution to this? Bloody annoying as I need to save several documents (pages
-
How many frames should I cut out each second to get a old film look?
Hi, What is the general rule of thumb (if their is one) of how many frames should be cut every second to achieve a choppy old film look? Or maybe it's not every second? What do you guys do?