Filter two different columns in a Dashboard, OBIEE 11g
Hi everyone,
I have read many times this forum, but I this is my first post. I have a problem with OBIEE 11g and I hope you guys could help me.
In the dashboard I have created, there is an analysis table which has the following columns:
(1) Month - (2) Doctor's Name - (3) Num. of Appointments Month 1 - (4) Num. Appointments Month 2
The point is that I want the users to choose in their dashboard a month to filer column (3) and a month to filter column (4), so they can have a comparative view of the number of appointments for each month. I have tried to do this with prompts, but what happened is that the prompt filtered ALL the columns, not just one of them.
So, is there any way of filtering just one column? I mean, when in the dashboard view, not in the analysis creation view.
Thank you in advanced! :)
Javier
Edited by: user13724353 on 07-jun-2011 7:30
Hang on a minute... I think this is possible.
Set up two dashboard prompts to populate 2 presentation variables for your first and second months.
Once you have a presentation variable you can fix the value of column 3 and 4 using the "Filter using" syntax (check the functions list when you edit the column formula). By using Filter using you should be able to pass in the value of your presentation variable.
Paul
http://total-bi.com
Similar Messages
-
Filter on Fact columns at report level- obiee 11g
Hello,
The error I am getting in my report is : Incorrectly defined logical table source (for fact table SUMM) does not contain mapping for [LEDGERFACT.CD, LEDGERFACT.YEARID].
The Model(Physical and BMM Layer) is as follows: DIM_LF_B is joined to 2 fact tables LEDGERFACT and SUMMARY
DIM_RPT_PARAM -> DIM_LF_B -> LEDGERFACT
DIM_RPT_PARAM -> DIM_LF_B -> SUMMARY
Note that the aggregation is not set for any of the Fact columns. (I am aware that all measures have to be set some aggregation type , but Client restrictions as not to edit the rpd :( )
Now on the report front, i have pulled following columns:
>> Col name: Description ||| Forumla: DIM_RPT_PARAM.ITEM_DESC
>> Col name: Actual Amt ||| Formula: case when SUMMARY.MONTHID=3 and SUMMARY.YEARID=2012 then sum(SUMM.AMT_1) else 0 end
>> Col name: Plan Amt ||| Formula: case when LEDGERFACT.YEARID=2012 and LEDGERFACT.CD=300 then sum(LEDGERFACT.AMT_1) else 0 end
I am not able to understand as to why the BI server is throwing the error.
I tried removing the case condition and just applying the sum(as below), and the report comes up.
Col name: Description ||| Forumla: DIM_RPT_PARAM.ITEM_DESC
Col name: Actual Amt ||| Formula: sum(SUMM.AMT_1)
Col name: Plan Amt ||| Formula: sum(LEDGERFACT.AMT_1) Also for the following combination the report works
1)
>> Col name: Description ||| Forumla: DIM_RPT_PARAM.ITEM_DESC
>> Col name: Actual Amt ||| Formula: sum(SUMM.AMT_1)
>> Col name: Plan Amt ||| Formula: case when LEDGERFACT.YEARID=2012 and LEDGERFACT.CD=300 then sum(LEDGERFACT.AMT_1) else 0 end
2)
>> Col name: Description ||| Forumla: DIM_RPT_PARAM.ITEM_DESC
>> Col name: Actual Amt ||| Formula: case when SUMMARY.MONTHID=3 and SUMMARY.YEARID=2012 then sum(SUMM.AMT_1) else 0 end
>> Col name: Plan Amt ||| Formula: sum(LEDGERFACT.AMT_1)
Any help appreciated.
Thnks,
Shruti
Edited by: 970002 on Mar 28, 2013 7:18 AMHi Shruthi,
To be clear you have one table 'DIM_LF_B' and its separated out as FACT and DIM in BMM layer with respective formulas ? If yes check this http://www.varanasisaichand.com/2012/04/fact-and-dimension-from-single-source.html
let me know if it is different
Thanks,
Saichand -
Filename seperately & Putting data from Hash Map to two different columns
The following code produces the output as :
$ java getNamefile
File Name : reaper.txt
File Name : Testing
Is it possible to just get the file name "reaper" from it instead of reaper.txt
import java.io.*;
class getNamefile
public static void main(String[] args)
File f1 = new File("C:/javamyprograms/reaper.txt");
File f2 = new File("C:/javamyprograms/Testing/");
System.out.println("File Name : " + f1.getName());
System.out.println("File Name : " + f2.getName());
}Secondly I am trying to put the values from a HashMap into ".xls"
PrintWriter out = new PrintWriter (new FileWriter("Unique_words_count" + file) + ".xls");
and out.write(key + " " + hm.get(key));
This put the values in the same columns. I want the results to be two different columns like
column1 column2
key1 value1
key2 value2
Please do advise. Thanks in advance.Is it possible to just get the file name "reaper"from it instead of reaper.txtActually, I ran a test, and
System.out.println( "file name portion == " + ( f.getName().split( "\\." ) )[ 0 ] );works also:
This has the same effect as:
String fileName = f.getName();
String splitFileName[] = fileName.split( "\\." );
System.out.println( "file name portion == " + splitFileName[ 0 ] );Now that I think about it, the second form is more easily understood. There is really no reason to do it the first way. Just interesting to note that you can. -
How can I get these two results in two different columns?
SELECT COUNT(attr_id)
FROM pv_attribute
WHERE port_id = 322;
SELECT COUNT(attr_id)
FROM pv_attribute
WHERE port_id = 323;
How can I get these two results in two different columns?
ThanksSo Jens made a tiny mistake with the column name... shame you couldn't be bothered to research Pivoting so you could have corrected the mistake (possibly it was deliberate *{:-) ) and learnt something.
with pv_attribute as (select 16123 attr_id, 322 port_id from dual union all
select 16123 attr_id, 322 port_id from dual union all
select 19223 attr_id, 322 port_id from dual union all
select 11193 attr_id, 323 port_id from dual union all
select 13163 attr_id, 323 port_id from dual)
-- end of test data setup
select sum(decode(port_id, 322, 1, 0)) cnt_322,
sum(decode(port_id, 323, 1, 0)) cnt_323
from pv_attribute
where port_id in (322, 323) -
Display two different column types in cross tab
I am using Cross Tab template in crystal XI and I have to show two different column types one is of type int and other is of type string. Below is the format of the report
AmountGiven Amount Spent Attended
Mike 5000 3000 Yes
Steve 200 200 No
Is there a way I can do this showing "yes" or "no" in the third column???
Thanks...Hi
If you are trying to show "yes" or "no" for a column value in a cross tab, then yes we can try using a formula for it.
I would suggest you 2 ways that you can try at your end:
1.
a) Create a formula in the cross tab expert and write your condition.
for eg: if Sum({Orders.Order amount}) > 5000 then "yes" else "no"
b) Then select that formula in the summarized fields in cross tab expert and change the summary to MODE.
c) You can see the "yes" and "no" Within the same box.
2.
a) Add a field to the colums in the cross tab expert.
b) A column gets inserted in the cross tab.
c) Right click the field and select format field.
d) Go to Common tab and write a formula for the display string.
e) Write the condition in that formula.
f) You can see a new column with the expected values.
Hope this helps you..
Please revert incase of any queries.
Regards
Pradeep Hulke -
Getting DISTINCT count from two different columns
Hi all,
I have following query which gives currency code from two different tables. I would like to get the distinct count of currency codes from these two different columns.
SELECT eb.person_seq_id, eb.bonus_amount, eb.currency_cd, ed.currency_cd_host
FROM fr_emp_bonuses eb, fr_emp_details ed, fr_periods p
WHERE eb.person_seq_id = ed.person_seq_id AND ed.period_seq_id = eb.period_seq_id
AND ed.period_seq_id = p.period_seq_id AND p.period_status = 'CURRENT'
AND eb.bonus_amount >= 0 AND eb.person_seq_id = 3525125;
This query gives following result
3525125 240000 USD INR
3525125 0 USD INR
3525125 60000 USD INR
3525125 50000 USD INR
There are two distinct currency codes (USD, INR) and total amount is 350000. So I am looking for a query to give me the following result
3525125 350000 2
Thanks in advanceHi,
Here's one way:
WITH original_query AS
SELECT eb.person_seq_id
, eb.bonus_amount
, eb.currency_cd
, ed.currency_cd_host
FROM fr_emp_bonuses eb
, fr_emp_details ed
, fr_periods p
WHERE eb.person_seq_id = ed.person_seq_id
AND ed.period_seq_id = eb.period_seq_id
AND ed.period_seq_id = p.period_seq_id
AND p.period_status = 'CURRENT'
AND eb.bonus_amount >= 0
AND eb.person_seq_id = 3525125
, unpivoted_data AS
SELECT person_seq_id
, bonus_amount
, currency_cd
FROM original_query
UNION ALL
SELECT person_seq_id
, 0 AS bonus_amount
, currency_cd_host AS currency_cd
FROM original_query
SELECT person_seq_id
, SUM (bonus_amount) AS total_bonus_amount
, COUNT (DISTINCT currency_cd) AS distinct_currency_cds
FROM unpivoted_data
GROUP BY person_seq_id
;There may be a shorter, more efficient way to get the same results, but without knowing more about your tables, I can't tell.
The tricky thing is getting two columns (currency_cd and currencuy_cd_host in this case) counted together. You can't simply say
COUNT (DISTINCT eb.currency_cd) +
COUNT (DISTINCT ed.currency_code_host)That happens to get the correct result with the sample data you posted, but what if you had data like thEe following?
currency_cd currency_cd_host
INR USD
USD INRHere, the count of distinct currency_cds is 2, and the count of distinct currency_cd_hsots is also 2. Does that mean the grand total is 2 + 2 = 4? No, the 2 codes in one column arte the same 2 codes as in the other column. We need to get both currency_cd and currency_cd_hsot into the same column, and then do COUNT (DISTINCT ...) on that combined column. A UNION, as shown above, will certainly do that, starting with your query as you posted it. The query you posted isn't necessarily the best frist step towards this result, however, so there may be a much better approach, depending on your tables.
Edited by: Frank Kulash on Feb 1, 2012 6:21 PM
Here's a slightly shorter, and probably more efficient way to get the same results:
WITH cntr AS
SELECT LEVEL AS n
FROM dual
CONNECT BY LEVEL <= 2
SELECT eb.person_seq_id
, SUM (eb.bonus_amount) AS total-amount
, COUNT ( DISTINCT CASE
WHEN c.n = 1
THEN eb.currency_cd
ELSE ed.currency_cd_host
END
) AS distinct_currency_cds
FROM fr_emp_bonuses eb
, fr_emp_details ed
, fr_periods p
, cntr c
WHERE eb.person_seq_id = ed.person_seq_id
AND ed.period_seq_id = eb.period_seq_id
AND ed.period_seq_id = p.period_seq_id
AND p.period_status = 'CURRENT'
AND eb.bonus_amount >= 0
AND eb.person_seq_i = 3525125
-- NOTE: no join condition involving c; we really do want a cross-join
GROUP BY eb.person_seq_id
; -
Sum two different columns from two different tables
Can you select and sum two different columns, from two different tables in the same sql statement?
i.e.
table1
Item----OnHand_Qty
A--------10
A--------15
B--------10
B--------10
C--------20
table2
Item----Trx_Qty
A--------2
A--------4
A--------6
B--------1
B--------1
C--------4
I'm looking for the following results from a query
Item----Sum(Onhand_Qty)---Sum(Trx_Qty)
A--------25Like this?
SQL> create table table1 (item,onhand_qty)
2 as
3 select 'A', 10 from dual union all
4 select 'A', 15 from dual union all
5 select 'B', 10 from dual union all
6 select 'B', 10 from dual union all
7 select 'C', 20 from dual union all
8 select 'D', 30 from dual
9 /
Tabel is aangemaakt.
SQL> create table table2 (item, trx_qty)
2 as
3 select 'A', 2 from dual union all
4 select 'A', 4 from dual union all
5 select 'A', 6 from dual union all
6 select 'B', 1 from dual union all
7 select 'B', 1 from dual union all
8 select 'C', 4 from dual union all
9 select 'E', 3 from dual
10 /
Tabel is aangemaakt.
SQL> select nvl(t1.item,t2.item) item
2 , t1.sum_onhand_qty
3 , t2.sum_trx_qty
4 from ( select item, sum(onhand_qty) sum_onhand_qty
5 from table1
6 group by item
7 ) t1
8 full outer join
9 ( select item, sum(trx_qty) sum_trx_qty
10 from table2
11 group by item
12 ) t2
13 on (t1.item = t2.item)
14 /
I SUM_ONHAND_QTY SUM_TRX_QTY
A 25 12
B 20 2
C 20 4
E 3
D 30
5 rijen zijn geselecteerd.Regards,
Rob. -
OBIEE Answer : SQL Filter for one column of the Dashboard sample : 201301
I need to filter the report on the basis of one of the filter on the column which is created by custom calculation :
YEAR ("Order Header Attributes"."Status Date" ) * 100 + WEEK("Order Header Attributes"."Status Date" )
and this in the Number format.
I need the filter as : 2013 + Week(CurentWeek) -1 = 201302
Please help me create a custom SQL filter for the same.Anitha ,
I am getting the error while doing it with Prompt :
I went to the Dashboard on top Left next to results there is a Prompt there i clicked a new prompt i gave a name , description selsected my column in Filter on Column
Operator : = is equal to / is in
How should the user choose a value or values?
* Select it from a drop-down list
Browse through choices and/or type in directly
* Single Value Only
What values should be shown to the user?
None
All Values
Limited Values
* SQL Results (year("Status Date")*100) + WEEK_OF_YEAR("Status Date")-1)
(The values returned by this SQL statement)
Other options
Choices per page
(leave blank for automatic setting)
Allow user to constrain choices
Allow user to skip prompt
I am doing correctly please help me in case i am not doing it correctly
Regards ,
Nidhi -
How can I join/Full outer join two different columns instead of union all?
Hi,
I have a scenario as the following:
I am performing set operations using obiee 11g where I want to take values from two different criteria. Howwver, I dont want union to take place, instead i want join to take place to see all the columns in the output.
For that, I tried changing the sql in advanced tab and tried to put full outer join instead of union all but its not allowing me to change.
How can I achieve it? please help.
Thanks.Hi,
My problem is that I am unable to modify the sql in advanced tab. Probably due to some security reason,it's restricting me to change.
Can you suggest me a way to change it?
Thanks.. -
Different calculation on each column in table in obiee 11g report??
Hi ,
I have to display values in a table for measures in obiee 11g report which should hold different calculation on each column. For ex:
Result 1:
Flag Display Transaction Amount
C 'A' 2 3
C 'B' 3 0
SubTotal1 5 3
Result 2:
Flag Display Transaction Amount
H 'C' 2 11
H 'D' 0 0
SubTotal2 2 11
Result 3:
Flag Display Transaction Amount
H 'C' 1 0
H 'D' 1 0
SubTotal3 2 0
Final Result:(Transaction shd hold :-subtotal1-subtal2 , Amount should hold:-subtotal1-subtal2+subtota3)
Flag Display Transaction Amount
C 'total tran(1-2) 3 8
Total Amnt(1-2+3)'
Please help me how can i achieve this ... ??? I am new to OBIEE 11g.
Thanks,
PaviThere are a few things I cannot understand; I'm assuming Transaction and Amount are fact columns. Then how do they have different values for the same values of Flag and Display ??
Anyway, sub total can be achieved by going to edit view for the table and from columns and measures area under the Layout pane click on the summation icon and select After. This will automatically display a grand total value at the bottom of each fact column.
Now, to get the final result, say Total Transaction you can add a dummy column and edit its formula.
Total Transaction = trans_subtotal1 - trans_subtotal2 and
Total Amount = amt_subtotal1 - amt_subtotal2 + amt_subtotal3
Now if we could say that trans_subtotal1 is the total of transaction value when Flag = 'C' or something like that then you can get this value of subtotal1 by using the formula FILTER(SUM("Subject Area"."Folder".Transaction Column") USING (DESCRIPTOR_IDOF("Subject Area"."Folder"."Flag column") = 'C')). Similarly we can obtain subtotal2 and subtract them to get the total transaction value. But I am sure if we can do this because for the same values of Flag and Display, Transaction has different values. But by using the above formula, the values we obtain for subtotals 2 and 3 will be the same. So calculating Total Amount would be a problem.
The above formula is obtained by going to edit formula and selecting the filter option at the bottom of the edit dialog box.
Hope I made my point clear -
SQL Server Reporting Services- Coloring a Cell Background Based on two different column group values
Hello All,
I have a matrix report with time scale on the x axis and Resources on Y axis Showing the tasks assigned to each resource for a period of time. Here I have to color a matrix cell showing task details on tool tip with background color of the cell.
So Please help me on this.I have a expression like this...
In my case the color should be filled for the cell with name "Fields!task_name.Value" based on the values of "Fields!Day_Wise.Value " where we have the values for Daywise as S,M,T,W,T,F,S. So i need the background for the cell with name
task_name as Light Grey on Friday and Saturday, But we have the same name S for sunday also, which should come in different color.
=iif(Fields!Day_Wise.Value ="F","LightGrey",
IIF(PREVIOUS(Fields!Day_Wise.Value) ="F","LightGrey",
iif(Fields!task_name.Value="","White",
iif(InStr(Fields!task_name.Value,"||")>0,"Maroon",
iif(InStr(Fields!task_name.Value,"NULL")>0,"Sienna",
iif(InStr(Fields!task_name.Value,"Pink")>0,"Pink",
iif(InStr(Fields!task_name.Value,"Red")>0,"Red",
iif(InStr(Fields!task_name.Value,"Purple")>0,"Purple",
iif(InStr(Fields!task_name.Value,"Green")>0,"Green",
iif(InStr(Fields!task_name.Value,"White")>0,"White",
iif(InStr(Fields!task_name.Value,"Cyan (Teal)")>0,"Teal",
iif(InStr(Fields!task_name.Value,"Olive")>0,"Olive",
iif(InStr(Fields!task_name.Value,"Blue")>0,"Blue",
iif(InStr(Fields!task_name.Value,"Light Blue (Aqua)")>0,"LightBlue",
iif(InStr(Fields!task_name.Value,"Yellow")>0,"Yellow","Black"
Thanks
AJ HameedHi AJ Hameed,
According to your description, you want to set the background color for the cells based on the values inside of cells and the values the column group. You want to set grey for cells on Friday and Saturday, set colors based on the task name on other weekdays.
Right?
In Reporting Services, there's no problem if we have two different data values in conditional expression, so we can set background color based on Day_Wise or task_name. One issue in this scenario is, we can't have value "S" for both Saturday and Sunday when
working in a matrix. Otherwise the task_name will overwrite the previous task_name (for numeric values, it will do sum calculation). So we suggest you change the values for weekdays in database. The expression you have posted was correct. It only has a small
issue: the "Light Blue(Aqua)" also contains "Blue", so when doing conditional judging, the expression will return "Blue" instead of "Light Blue". We have tested in our local environment. For viewing convenience, we used the Switch() function in our expression:
=IIf(Fields!Day_Wise.Value="Fri" or Fields!Day_Wise.Value="Sat","LightGrey",
Switch(
InStr(Fields!Task_name.Value,"White")>0,"White",
InStr(Fields!Task_name.Value,"||")>0,"Maroon",
InStr(Fields!Task_name.Value,"Pink")>0,"Pink",
InStr(Fields!Task_name.Value,"Red")>0,"Red",
InStr(Fields!Task_name.Value,"Purple")>0,"Purple",
InStr(Fields!Task_name.Value,"Green")>0,"Green",
InStr(Fields!Task_name.Value,"Cyan(Teal)")>0,"Teal",
Fields!Task_name.Value="","White",
InStr(Fields!Task_name.Value,"Olive")>0,"Olive",
InStr(Fields!Task_name.Value,"Blue")>0,"Blue",
InStr(Fields!Task_name.Value,"Aqua")>0,"LightBlue",
InStr(Fields!Task_name.Value,"Yellow")>0,"Yellow",
InStr(Fields!Task_name.Value,"Orange")>0,"Orange",
InStr(Fields!Task_name.Value,"Null")>0,"Sienna",
true,"Black"
The result looks like below:
Reference:
Matrices (Report Builder and SSRS)
If you have any question, please feel free to ask.
Best Regards,
Simon Hou -
How to download data into two different columns 2003 excel format in ole
Hi ALL
when we download data into excel using ole with delimiter it works fine in 2007 but when we check this with 2003 format
both fields come in only one column .Can any one suggest
CONCATENATE WA_ALL-PERNR LV_ICNUM INTO WA_PERNR SEPARATED BY W_DELI IN CHARACTER MODE.If you're already using OLE, you can fill in value for each cell separately instead of using a delimiter. Something like this fragment:
FORM fill_cell USING p_row p_col p_value.
CALL METHOD OF obj_excel 'CELLS' = obj_cell
EXPORTING
#1 = p_row
#2 = p_col.
SET PROPERTY OF obj_cell 'VALUE' = p_value.
ENDFORM. "fill_cell -
How to link two different columns in two different UDTs
hi all
by using linkedtable() i am able to link to a particular table but my requirement is linking to a particular column of that table how to do this . can i get a sample codeSAP Business One only supports linkage between UDTs (e.g. @NMS_Person / @NMS_PersonX; NMS is your namespace (use XX if this is just about customer functionality)) through @NMS_PersonX.Code to be linked to @NMS_PersonID.PersonID.
If this doesn't meet your requirements you have to work with non-B1-UDTs (any "stand-alone"/"custom" table) + e.g. use foreign keys - or do the linkage through some checks in your code. -
To calculate variance from two different columns
Hi
I have a table like this
create table temp1
(f_name varchar2(100),
f_month_Year Varchar2(10),
f_amount integer
Records in this table will be like this:
f_name f_month_Year f_amount
Ajay 092007 500
Bhavani 092007 700
Bhavani 102007 200
Ajay 102007 100
I would like to get the Output like following:
092007(Previous Month) 102007(Current Month) Variance
Ajay 500 100 400
Bhavani 700 200 500
the variance should be precalculated in the query itself.
Please help me on this.
Regards
SankarLAG
<br>
<br>
Example:
<br>
<br>
SQL> select * from t;
NAME DT AMT
Ajay 092007 500
Bhavani 092007 700
Bhavani 102007 200
Ajay 102007 100
SQL> select name,curr,pre,pre-curr var
2 from
3 (select name,
4 lag(amt) over(partition by name order by to_date(dt,'mmyyyy')) pre,
5 amt curr,dt
6 from t
7 )
8 where dt = to_char(sysdate,'fmmmyyyy');
NAME CURR PRE VAR
Ajay 100 500 400
Bhavani 200 700 500 -
Hiding columns in pivot table OBIEE 11g
Hi experts,
I am trying to create a pivot table with individual values in columns but I also need to display a grand total as values but also as percentage and as cumulative percentage.
I duplicated the measure once in the measure area, and selected display data as percentage of column, and another time using display cumulative and percentage of column.
The result is fine, but all the elements are displayed as column for the percentage and for the cumulative. Or, I only need the Grand Total Percentage and Cumulative, but I don't need all the columns for Percentage and cumulative.
I have tried to find out a way to customize the XML but nothing good.
Is there a way to display only the grand total for percentage and cumulative without having to display all the individual columns?
Any help highly appreciated.
RegardsIf I get your question correctly.. You are trying to present the grand total towards the end of the Pivot and OBIEE is displaying the totals of all the sections and then the Grand Total.
Try not to use the grand total of the sections but create a new pivot view and just display the grand total in that view.
So you will have your normal sections and then another pivot view just for the grand total.
As far as I know, there is no option to hide the individual section totals.
Maybe you are looking for
-
Power Pivot - Calculating Exchange Rates depending on MONTH
Hello everyone, I have a question, would like to know if someone can help me figuring out a solution. I have created a spreadsheet using powerquery and powerpivot. Loading the data on powerquery from different spreadsheets was a charm, the problem is
-
JFXtras 2 CalendarTextField with Picker in a TableView Cell
I would like to use the new jfxtras 2 CalendarTextField in a tableview cell, so each cell in a column has its own date picker popup. Could someone provide sample code on how to do this.
-
just bought Ipad 2 16GB 3G for my mum but i want to use it first to set it up shouldn't it access my modem or do i still have to activate the sim?
-
DHCPCD enp3s0f2: no IPv6 Routers available
Hi, Since the dhcpcd update I've some trouble with it ! sudo systemctl status dhcpd@enp3s0f2 enp3s0f2: no IPv6 Routers available I've tried to add in /etc/resolv.conf.tail nameserver 208.67.222.222 nameserver 208.67.220.220 option single-request Stil
-
Easy Way to allow Mac Users to Access Windows Shares
I have a client that runs a mix of macs and pcs. They have a seperate domain for macs running on an xserve with 10.2.8 server and a domain of windows 2000 servers for the pcs My question is, is there an easy way to allow the mac users to be authentic