Show rows with empty values
Hello,
We are creating a cross tab report, with products as the columns, and relationship managers with direct and shared revenue displayed across the rows.
For Eg
Relationship Manager Coverage Product1 Product2 Product3 Product4
Bob Direct 100, 0, 35, 50
Shared 0, 0, 15, 0
Alex Direct 15, 25, 40, 10
Shared 5, 0, 5, 0
George Direct 0, 0, 0, 30
Shared 0, 0, 0, 5
The problem lies when either one of the products has no values, or one of the relationship managers has no direct or shared revenues. If one of the products has no revenues, it disappears, and also when one of the RMs has no direct or shared revenues, the Direct or Shared row disappears.
I have tried to create a second query just included the Coverage variable, and using this variable in Query 2 with the RM variable from query 1, along with checking the "Show Rows with Empty Measure values", "Show Rows with Empty Dimension Values" and "Show when empty", but it still does not appear to work.
It only shows rows with values in them, and shows the rows with empty values at the end with no RM.
I have not tried to solve for empty columns yet.
Help with this would be much appreciated!!!!!!!!
Thank you
Hi ,
I think you can resolve this issue following ways ,
you need create another query ( Ex :Qauery2 ) add Product object and RM (Direct,shared) object only without conation. So now query2 result wil have all product and RM(Direct,shared).
Merge the Product object and RM between query1 and query2
Now create table using Product and RM from query2 and measure value from query1. Now you will get row even there is no data.
If you want try this sample report using efasion unvierse.
1) Add year ,state and Discount objects and apply condition Year Not in list "2004" and state Not in list "California "
2) run this query and create the cross tab table . Now you will not get 2004 column and California row in table.
3) Create query2 add Year and State only without any condition , run the query. Now query 2 will display all state and year .
4) Merge the column Year and State between query1 and query2
4) Create the cross table ussing Year and state from query2 and Discount from Query1
Now cross table will show 2004 and California ,even there is not in query 1.
I hope this will help you.
Ponnarasu
Edited by: ponnarasuk on Dec 7, 2011 12:48 PM
Similar Messages
-
Deleting rows with missing values in field in start routine of update rule
Hello experts,
how can I delet rows with missing values in a specific field in the start routine of update rules?
I think ABAP code should look something like this:
delete ... from DATA_PACKAGE where Z_NO = ''.
thanks in advance for any suggestions!
hizaWrite:
delete data_package where field = value.
Hope it helps.
Regards -
How to merge rows with similar values in alv grid display in webdynpro
Hi experts,
i want to know about how to merge rows with similar values in alv grid display of webdynpro.grouping rows is possible in table display in webdynpro but i am not able to do row grouping in the alv grid display in webdynpro.
kindly suggest.
thanks ,
Anita.Hi Anita,
did you find a solution for this? I have opened a Thread, if you know the answer maybe you could help me out:
Is there an ALV function similar to the TABLE Row grouping?
Thanx in advanced!!!
Kind Regards,
Gerardo J -
Updating multiple rows with different values
Hi!
I have a problem. I need to update more then 1000 rows with different values. How can I do it?
For exsample i have table:
id; color, date,
1 red
2 green
3 white
I need to update date field.
Update table
set date='01.02.03'
where id=1
Update table
set date='01.03.03'
where id=2
Maybe there is way how to update multiple rows at one query?
Sorry for my bad english.
Thanks!Hi,
You can try this
UPDATE TABLE SET DATE = CASE
WHEN ID = 1 THEN TO_DATE('01-02-03','DD-MM-RR')
WHEN ID = 2 THEN TO_DATE('01-03-03','DD-MM-RR')
ENDcheers
VT -
Returning 250 rows with 1000 Values in "IN" Clause Oracle 10g On IBM AIX !!
Hi,
Recently we have done the OS migration of Oracle 10g Server from Windows Server to IBM AIX. Everything is fine, But today we came across one crucial bug in the code, i.e In the Select Query, though we're expecting 1000 rows with 1000 values in "IN" Clause , It's returning Only 250 rows. Where as it's returning 1000 rows in Windows Environment with 1000 values in "IN" Clause. I have browsed throgh Google for the resolution but failed to get that.
This is something like,
In Oracle 10g On windows :-
select * from emp
where dept_id in (1,2,3,...................1000);
Assuming there are the dept_id values in Emp table from 1 ... 1000, It's returning 1000 rows.
In Oracle 10g On IBM AIX ,
select * from emp
where dept_id in (1,2,3,...................1000);
Assuming there are the dept_id values in Emp table from 1 ... 1000, It's returning 250 rows. Pls help me, what could be the reason for this. and what needs to be checked to fix this.
Pls suggest !!!
Rajammmh. Did you compared the select count(*) from your_table; in the two cases.
If the result is not good and nobody has deleted rows between migration and your test, you migration need to be replayed.
Which migration did you select, Transportable database or exp/imp...?
Edited by: Dba Z on 16 août 2009 08:56 -
Records with a picklist field with empty values can't be seen from a report
Records with a picklist field with empty values can't be seen from a report. I've created a report that have a picklist as a column. When there is no values the record(s) associated to this picklist don't appear. Do you know what are the common causes for this event?
Regards
ArturoHi samrat chakraborty ,
go to SUIM > roles > roles by complexselection criteria>
under the selection according to authorization values give the object's form SU53 screen and press enter it will asks the values for given object pass the values as per the SU53 and execute it will give the list of roles.... capture the roles. The user gets access if you give the any one of the listed roles is assigned, assign the role as per your approval process.
Check with the below link for more assistence:
http://help.sap.com/saphelp_erp2004/helpdata/EN/71/8fba30840c6e4d90da3526971cc684/frameset.htm
Regards,
S.Manu. -
Smartform table with empty value in cell
Hi,
in my smartform i´ve got a table with four fields:
e.g. MATERIAL QUANTITY BAGS TEXT
the question is that if value of field BAGS is initial the smartform displays
the value of field TEXT in the cell of field bags,
that is, if BAGS = INITIAL i would get:
MATERIALl QUANTITY TEXT
(the value of field TEXT has been shifted to the left)
What do i have to do in order to avoid the shifting of values to the left if one
of the cells has an empty value?
Best regards.Hi,
I guess you are using tabs to print the four fields of tables.
As those are fields of tables make use of TABLES concept in smartform instead of tabs. Then it will print in the exact location.
Give each field as one cell in the table.
Br,
Laxmi. -
Report Painter - how to insert sub header rows with no values
In a report painter, I am designing a report with several rows with formulas. I need to insert a sub-header row in the middle of the rows. That will not have a value. It shall contain no value, but I am given only options of either insert a row of characteristics or a formula. I need neither of them. Can we have something excel like feature in report painter (4.6c) just to insert a sub header row? If so how do we get that.
e.g
ADMINISTRATIVE EXPENSES (how to insert this row?)
Account 1 - 10Hi,
try to add a formular row containing a formular like = +x -x.
Maybe you can use "formatting / row" and use overscores / underscores to get a blank row (underscore one line, overscore the line thats following).
No other idea...
best regards, Christian -
How use replace all grid row with variable value
hi master
sir i have master detail form
in detail form i have 5 column grid thate have 25 row at time
one column name id
such as id have value 23
but i want replace all id row with 555
how i replace all id in grid with 555 befor commit_form
how i use loop for grid
or any other method
please give me idea
thank's
aamirGo_Block('Detail');
First_Record;
Loop
:detail.item := '...' ;
Exit when :system.last_Record = 'TRUE' ;
Next_record;
End loop;
First_Record ;Francois -
How to select rows with Empty Column Entry
I am trying to select all rows with an empty column
select row1 from table where row2=' ';
Any suggestions. I tried a space and no space in between the ''.An (theoretical) argument could be made that an empty string is not NULL (uknown), however Oracle's SQL and PL/SQL engines make no such distinction for VARCHAR2 and CHAR data types. As stated, you must use NULL as the comparison.
Michael -
How to create the new row with existing values
Hi all,
first of all i create a row,
i opened that in edit mode,
suppose i want to edit any one of the value in that recordd,
that time compulsory create a new row with those valuess.
how can i create a new row with those valuess.Hi Anusha,
This code correct for your requirement, only thing is you are not able to modify it as per your requirement.
What you have to do is:
1. Copy queried row into into new row, change primary key values(but don't commit your changes here).
2. Now you have two rows in your VO(OLD as well as New)
3. Make any changes if you want using User Interface.
4. At the save button first compare OLD and NEW row, if any value is differing then commit the chnages(it will insert new row in corresponding database table), if no changes are there I mean to say OLD value and NEW rows are same then rollback(it will remove copied row from VO and no row will be inserted in database.)
While comparing rows please note that Primary keys will not be same so don't compare Primary keys while comparing rows.
I hope it will help you.
Regards,
Reetesh Sharma -
Query to get row with max values for distinct
I have a table test with ID, ADID, MTMST columns.
ID ----ADID---- MTMST
1 ----100---- 24-MAR-12 08.17.09.000000 PM
1 ----101---- 24-MAR-12 08.18.15.000000 PM
1 ----102---- 24-MAR-12 08.18.56.000000 PM
2 ----103---- 24-MAR-12 08.19.21.000000 PM
2 ----104---- 24-MAR-12 08.19.36.000000 PM
2 ----105---- 24-MAR-12 08.19.46.000000 PM
3 ----99---- 22-MAR-12 09.48.22.000000 PM
I need the rows with max ADID for each ID.
I used the following query but it provided max ADID of the table but not the distinct ID
select * from test where ADID in (select max(ADID) from test where id in (select distinct(id) from test where mtmst > sysdate -1))
Result:*
ID ----ADID---- MTMST
2 ----105---- 24-MAR-12 08.19.46.000000 PM
Expected result:*
ID ----ADID---- MTMST
1 ----102---- 24-MAR-12 08.18.56.000000 PM
2 ----105---- 24-MAR-12 08.19.46.000000 PM
Thanks,
Dheepan
Edited by: Dheepan on Mar 24, 2012 9:53 AMselect id, adid, mtmst from test where (id, adid) in (select id, max(adid) from test group by id) and MTMST>sysdate-1
is the answer. -
Issue with empty value of LOV of first row after clicking on add row button
JDeveloper 11.1.14
I have a page with table-form layout.
In the form I have two detail tables on the same page (tabbed).
I have an issue with using model-choicelist LOV's in the detail tables.
I am able to add a new row in the detail table, select a value from the model-choiceList LOV (which is required) and save the new row.
After adding another row in this table the value of the model-choiceList LOV in the previous row is suddenly empty on the screen. It is not empty in the database,
I have checked it in the datbase. Only the value of the LOV of the first row on the page is being cleared after clicking on the add row button.
After saving the new row I get the following error on the screen:
Error: a selection is required. --> first row
Does anyone have a suggestion how to solve this issue?After adding another row in this table the value of the model-choiceList LOV in the previous row is suddenly empty on the screen. It is not empty in the database, Is the complete LOV blank or only the selected value .. can you try putting autoSubmit=true in the LOV and try ? Also check if you have any partialTriggers on the LOV from the add button ?
-
Dont show fields with same value as previous row.
Hi, If I have a table like this:
DEPNO_MONTH__COST__ID
10_____ Jan______100___ 2
10_____ Jan______200___ 4
10_____ Jan_______50____3
20_____ Feb______30____4
30_____ Jan ______30____5
30_____ Feb______40____6
I need a select that shows the table like this:
DEPNO_MONTH_COST_ID
10______Jan_____100___2
________________200___4
________________50____3
20______Feb_____30____4
30______Jan_____30____5
________Feb_____40____6
Can someone please help me? (ingore underscore)
/Sörenlike this ?
SQL> select decode(rno1, 1, depno, null) depno,
2 decode(rno2, 1, mon, null) month,
3 cost, id
4 from (select depno,
5 mon,
6 row_number() over (partition by depno order by depno, mon, cost ) rno1,
7 row_number() over (partition by depno, mon order by depno, mon, cost ) rno2,
8 cost, id
9 from t1
10 order by depno, mon, cost );
DEPNO MONTH COST ID
10 Jan 50 3
100 2
200 4
20 Feb 30 4
30 Feb 40 6
Jan 30 5
6 rows selected.
SQL>
[pre] -
Selecting rows with null values in an sql 3 table
Hi everyone I use oracle database 11g and have the following SQL statement:
SELECT Oprema.Opr_Id, Oprema.Datum_Nabavke, Oprema.Datum_Zaduzenja, Oprema.Dobavljac, Oprema.Jedinica_Mjere,
coalesce ((Oprema.Zaduzio), 0), Oprema.Vrijednost, Oprema.Kolicina_Nabavna, Oprema.Kolicina_Otpisana, Oprema.Kolicina_Trenutna, Oprema.Status, Oprema.Konto,
Oprema.KontoIsp, Oprema.Broj_Naloga, Oprema.Sifra_Objekta, Dobavljaci.Naziv AS DobNaz, coalesce(to_char(Uposlenici.Prezime), 'hm'), Objekti.Objekat_ID
FROM OPREMA Oprema, UPOSLENICI Uposlenici, DOBAVLJACI Dobavljaci, OBJEKTI Objekti
WHERE Oprema.Dobavljac=Dobavljaci.Dob_Id AND Oprema.Zaduzio=Uposlenici.UposlenikId AND Oprema.Sifra_Objekta=Objekti.Objekat_IDWhat I need is to show all the rows in the database. The problem is that some of the foreign keys Zaduzio and Objekti are NULL. This means the databse won't show those and only shows me rows where both have values. In all of these rows except for 3 only one of the two foreign keys has a value.
So what I need is an sql that would show me all 3. As you can see I tried with Coallesce but it didn't work, still only 3 rows show.
I also tried with UNION
SELECT Oprema.Opr_Id, Oprema.Datum_Nabavke, Oprema.Datum_Zaduzenja, Oprema.Dobavljac, Oprema.Jedinica_Mjere,
Oprema.Zaduzio, Oprema.Vrijednost, Oprema.Kolicina_Nabavna, Oprema.Kolicina_Otpisana, Oprema.Kolicina_Trenutna, Oprema.Status, Oprema.Konto,
Oprema.KontoIsp, Oprema.Broj_Naloga, Oprema.Sifra_Objekta, Dobavljaci.Naziv AS DobNaz, Uposlenici.Prezime, Objekti.Objekat_ID
FROM OPREMA Oprema, UPOSLENICI Uposlenici, DOBAVLJACI Dobavljaci, OBJEKTI Objekti
WHERE Oprema.Dobavljac=Dobavljaci.Dob_Id AND Oprema.Zaduzio=Uposlenici.UposlenikId AND Oprema.Sifra_Objekta=Objekti.Objekat_IDBut then the rows that have both Zaduzio and Objekti values are multiplied and selected twice.
So any ideas on how to do this?Hi,
If those foreign keys are NULL, then an inner join won't produce any results. Maybe you need to make it an outer-join, like this:
SELECT Oprema.Opr_Id
, Oprema.Datum_Nabavke
, Oprema.Datum_Zaduzenja
, Oprema.Dobavljac
, Oprema.Jedinica_Mjere
, COALESCE ( Oprema.Zaduzio
, 0
) AS zaduzio_or_0
, Oprema.Vrijednost
, Oprema.Kolicina_Nabavna
, Oprema.Kolicina_Otpisana
, Oprema.Kolicina_Trenutna
, Oprema.Status
, Oprema.Konto,
Oprema.KontoIsp
, Oprema.Broj_Naloga
, Oprema.Sifra_Objekta
, Dobavljaci.Naziv AS DobNaz
, COALESCE ( TO_CHAR (Uposlenici.Prezime)
, 'hm'
) AS prezime_or_hm
, Objekti.Objekat_ID
FROM OPREMA
JOIN DOBAVLJACI ON Oprema.Dobavljac = Dobavljaci.Dob_Id
LEFT OUTER JOIN UPOSLENICI ON Oprema.Zaduzio = Uposlenici.UposlenikId
LEFT OUTER JOIN OBJEKTI ON Oprema.Sifra_Objekta = Objekti.Objekat_ID
I hope this answers your question.
If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all the tables involved, and the results you want from that data.
Simplify the problem. For example, if you really need to display 18 columns, but 15 of them have nothing to do with the problem, then post a question that just includes e or 4 of those columns.
Explain, using specific examples, how you get those results from that data.
Always say what version of Oracle you're using (e.g. 11.2.0.2.0).
See the forum FAQ {message:id=9360002}
Maybe you are looking for
-
Iphoto no longer deletes the images from iPhone 5s after import.
I have the latest version of IOS, and iPhoto. Now, when I connect my iPhone 5s and import the photos and select the delete all that was imported option the photos on the iPhone are NOT deleted. Everything is stock apple software. Not jail broken, o
-
Need help recovering corrupted outlook express address book
So my dad's address book won't open. First, outlook express says that the address book isn't installed properly, and then that the address book file is corrupted. It has important business contacts, so its imperative that I save the data. How can I g
-
My lovely MacBook has died...trying to back up!
I am trying to back up my mac pro from my time capsule it's stating a 40 hr backup time is this normal?? It's via wifi.... Anyone know average timing?? Cheers peeps,
-
Turning 81/2 x 11 document into small book
How do I take a document that is on 81/2 x 11 sheets of paper and turn it into side by side reading like a book so I guess the pages would now be 81/2 by 5 1/2 and have it print that way. I can make it do it to read but not to print.
-
What is up with verizon!!????
i have the droid and, granted, the area i am in is not the best for cells, but it had been working in certain areas. now i have to turn it off and put it back on or take the battery out and put it back in in order to get any service. i do this abou