tag:blogger.com,1999:blog-1967293173182794602024-03-06T21:02:17.257+01:00OBIEE - Oracle Business Intelligence BlogOracle Business Intelligence Enterprise Edition, OBIEE, Oracle BI, OBI EE, BI, best practices, examples and technical solutions from data modelling to reports and dashboard.Goran Ockohttp://www.blogger.com/profile/16571461599213456839noreply@blogger.comBlogger381100tag:blogger.com,1999:blog-196729317318279460.post-75314036906356096612010-11-21T01:08:00.004+01:002010-11-22T12:05:37.055+01:00The business analysts guide to oracle hyperion interactive reporting 11 book review<span style="font-family:verdana;">Hello.<br /><br />It's been a long time since I posted something new, useful and innovative in my 108obiee.blogspot.com blog as I have less time for this because my current job now is mostly OFSAA based, but I'm trying to be up to date with all other.<br /><br />There is one interesting technical book on the market, about which I would now like to say something, not in detail, but describe all chapter in few words. The name of the book is <strong>The Business Analyst's Guide to Oracle Hyperion Interactive Reporting 11</strong> (by author <strong>Edward J. Cody</strong>). This book has been published by Packt Publishing (</span><a href="http://www.packtpub.com/"><span style="font-family:verdana;">http://www.packtpub.com</span></a><span style="font-family:verdana;">). Thanks them for sending me a copy to review it.<br /><br />The book is intended to primarly Oracle Hyperion Interactive Reporting user, but also may be used from inexperienced users to the business analyst, or we can apply i as the basics for all Oracle Hyperion Interactive Reporting developers. The book is written using EPM 11.1.1.3. Examples are based on Sales and Cost model.<br /><br />Although we often use this or similar software like this in combination to queries against multidimensional data, examples in this book are focused on relational data source queries.<br /><br />This book concentrate on usage of Interactive Reporting Web Client software and starts with short introduce to the EPM Workspace. And for those who don't know Oracle Hyperion Interactive Reporting is very powerful analytical and business intelligence engine/tool for ad-hoc querying, data analysis, dashboards, and other reporting capabilities.<br /><br />The book cover:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTORBiQ22x1foF947q6_BqGaHAnjRLsC2HnzbJ3qwOY8s-ot-qKI_TDNk4OMuKRO3HlQOT83ym37L65w3f8AkVSbIZzLWNR4L0clZ4EdeeHP22iRbunmqHZwPJmrEN2Lu4WQ5czIsHwU7p/s1600/Oracle+Hyperion+Cover+Image.png"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5542325829596951666" style="WIDTH: 125px; CURSOR: hand; HEIGHT: 152px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTORBiQ22x1foF947q6_BqGaHAnjRLsC2HnzbJ3qwOY8s-ot-qKI_TDNk4OMuKRO3HlQOT83ym37L65w3f8AkVSbIZzLWNR4L0clZ4EdeeHP22iRbunmqHZwPJmrEN2Lu4WQ5czIsHwU7p/s320/Oracle+Hyperion+Cover+Image.png" border="0" /></span></a><span style="font-family:verdana;"><br /><br />Now, on the first chapter - <strong>Chapter 1 - Oracle Hyperion Interactive Reporting</strong> you'll get an overwiev of Oracle Hyperion Interactive Reporting and EPM Workspace. First navigation to EPM Workspace, how to install and activate Web Client and understand Web Client interface and other useful information on manipulating documents and edit file properties and many more.<br /><br />How to build efficient query in Interactive Reporting document (file), manage query and get data from the source (database) you'll learn in <strong>Chapter 2 - The Query</strong>. Also, this chapter covers requests (queries), filters, sorting, how to identify metadata and many more. All this is explained in detail in the appropriate order. It is very easy for someone without experience or for analysts to build a query and get a result data. I have noticed a great filer options, you can build very powerful filter.<br /><br /><strong>Chapter 3 - The Data Model</strong> explains data model creation in detail (tables, joins and some advanced features) as pre-requisite for building queries. If you want to play with advanced querying, column expressions and functions, advanced filtering and joins and all that using custom SQL, combining data from separate queries in one query or using subquery - this is well explained in the Chapter 4- Advanced Querying and Filtering, which you should read more carefully and slowly.<br /><br />The next chapter, <strong>Chapter 5 - Results and Tables</strong> is more complex and explains table and results sections, what is their mutual relationship and also their relationship with the query section. You'll understand possibilities of filters on these sections, how to do a sorting, create totals and computed items. I must admit that I had to read twice this chapter in order to understand all. It would be good for readers to have some pictures about the table section to completly understand the relation of table section in comparision to results and query section.<br /><br /><strong>Chapter 6 - Pivots</strong>, explains how to analyze and present data using pivot sections, from the pivot creation till sorting, analyzing content and adding totals and computed items, using grouping column items, drill functionality and pivot formatting.<br /><br />Next chapter, <strong>Chapter 7 - Charts</strong>, explains different chart formats and types and just like all chapter before describes in detail creating charts, adding content, how to analyze data with charts, sorting, grouping, drills and more. Lots of pictures in this chapter.<br /><br />How to combine reporting objects (pivots, charts, etc) and data in unique view it is written in <strong>Chapter 8 - Reports</strong>. Understand report layout step by step, adding content, building report tables, using expressions, combining data from multiple datasets, slice data using some advanced features and other.<br /><br />The last chapter, <strong>Chapter 9 - Dashboard</strong>, explains how to build an interactive dashboard and provide high level interface to the business analyst. Understand all dashboard elements, add controls (drop down prompt for example), using script editor to write custom code (Java Script I think) and more.<br /><br />More about the book here </span><a href="https://www.packtpub.com/oracle-hyperion-interactive-reporting-11-1-business-analysts-guide/book"><span style="font-family:verdana;">https://www.packtpub.com/oracle-hyperion-interactive-reporting-11-1-business-analysts-guide/book</span></a><span style="font-family:verdana;">.<br /></span>Goran Ockohttp://www.blogger.com/profile/16571461599213456839noreply@blogger.com0tag:blogger.com,1999:blog-196729317318279460.post-65281195999179347612010-08-14T10:37:00.002+02:002010-08-14T10:39:43.127+02:00OBIEE 11g download<a href="http://www.oracle.com/technetwork/middleware/bi-enterprise-edition/downloads/bus-intelligence-11g-165436.html"><span style="font-family:verdana;">http://www.oracle.com/technetwork/middleware/bi-enterprise-edition/downloads/bus-intelligence-11g-165436.html</span></a><span style="font-family:verdana;"> </span>Goran Ockohttp://www.blogger.com/profile/16571461599213456839noreply@blogger.com0tag:blogger.com,1999:blog-196729317318279460.post-61925092087952824482010-02-06T00:21:00.005+01:002010-02-06T20:20:15.191+01:00OBIEE master-detail requests navigation - refreshing details when validate master record<span style="font-family:verdana;">I've been working as a Oracle Forms & Reports developer for many years and I thought that it would be great to have some of Oracle Forms functionality implemented here in OBIEE. Think about having two OBIEE reports. One is the master and the second is the detail. You may use departments employees or order and order items as an example. In Oracle Forms you'll have two blocks, one is master and the second is detail. When you are located in the first block row (master record) you have possibility to get detail data automatically. In other words detail records are fetched immediately when a user queries the master record.<br /><br />After some time of thinking I figured out the way how to do that in OBIEE and what is the best way to present it. I'll show how to implement master-detail requests navigation using HTML form text field on the master report along with iframes and using javascript events. The idea is to have master and detail reports in the same dashboard page, and including dashboard prompt. In the first report we have one text field (HTML form) in which the cursor is positioned automatically so we use this field to jump on the next or the previous master record, and as the result we are getting immediately detail report. Each report is placed in its own iframe. So, basically we navigate from the master to details on changing a record in the master request. I'll explain the whole process, from the building master-detail reports navigation to final customization.<br /><br />So I want to have something like this:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVnXDtICo1eQmp6pSdL2fROLDRzsARMDJZj4qfr15Eref7YLKii5d_XkhmVblEVYD9wmM4147E8Hkj2JS1aXV7e9tzahCdQH2AH0YUsc9_qm2zDupneQmwt9ZRLUuJWLQW0F7scHDfT_QQ/s1600-h/picture9.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 222px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5435087272395969058" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVnXDtICo1eQmp6pSdL2fROLDRzsARMDJZj4qfr15Eref7YLKii5d_XkhmVblEVYD9wmM4147E8Hkj2JS1aXV7e9tzahCdQH2AH0YUsc9_qm2zDupneQmwt9ZRLUuJWLQW0F7scHDfT_QQ/s320/picture9.JPG" /></span></a><span style="font-family:verdana;"><br /><br /><strong>Steps</strong><br /><br /><strong>Step one - building master and detail reports</strong><br /><br />Master<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiT-TSCX7cW8goSarPVKZZN9xBUGGPWVtenbdMsepl-6CGTBq-6wkRM5V4F2kucQyT-StZJaiT6G6C-30jI4UJGjKZlbCSWC4f6-k-DRZhNevHcNwC6URRq4ylOFKjywdHCEBaTWDlqch63/s1600-h/picture1.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 137px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5435065358619536450" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiT-TSCX7cW8goSarPVKZZN9xBUGGPWVtenbdMsepl-6CGTBq-6wkRM5V4F2kucQyT-StZJaiT6G6C-30jI4UJGjKZlbCSWC4f6-k-DRZhNevHcNwC6URRq4ylOFKjywdHCEBaTWDlqch63/s320/picture1.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Detail<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghtnBknuVoXbEPdLxc7JuAhpLtcp2QrhGHraKzbLOIB1oveqw2MQm5HNE_R54stU7Csa-WwmLOr5JgcCTLTHHRUJytMHvPF2jEEC4qxr8-Od9lV9kA_JeRGXA1gHMUfD2Ofsme8NTmRRd5/s1600-h/picture2.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 156px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5435065769011085570" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghtnBknuVoXbEPdLxc7JuAhpLtcp2QrhGHraKzbLOIB1oveqw2MQm5HNE_R54stU7Csa-WwmLOr5JgcCTLTHHRUJytMHvPF2jEEC4qxr8-Od9lV9kA_JeRGXA1gHMUfD2Ofsme8NTmRRd5/s320/picture2.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Master request shows categories and detail shows top ten products ranked by amount sold for the current row master category.<br /><br /><strong>Step two - building current iframe custom expression on master request including both requests using concatenated iframes and placing it in the narrative view to establish navigation in the same page between reports without losing window focus</strong><br /><br />Current iframe contains two concatenated iframes. Each iframe is build for one request and the detail request iframe is placed below the master. Each iframe has name. We use this column to place it in the narrative view of the master request because we'll show it on the dashboard to show automatically both reports (frames).<br /><br />Current iframe:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9JI4SIEs_oBg06B_1JaMkL7-nxmSaUPaYuPMdRaEbPfy0Sa4L8NXbeyrhOz2PojuZhQguT1-udn7GjkBhur1yG7us61P0tTCbv3aDsLFVhtLPx03oEvgkoYZYbIWKoYV9LfZDn8laptUo/s1600-h/picture3.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 143px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5435070125957764642" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9JI4SIEs_oBg06B_1JaMkL7-nxmSaUPaYuPMdRaEbPfy0Sa4L8NXbeyrhOz2PojuZhQguT1-udn7GjkBhur1yG7us61P0tTCbv3aDsLFVhtLPx03oEvgkoYZYbIWKoYV9LfZDn8laptUo/s320/picture3.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Better view:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhICtNde5B-qn2OsLGYwAkqm-WXtodX6dFXeu03jEC0AMtCIlwzQgSzgoD9-i76otNg8vxR-UvKkkYyeCifPrseM7jVNYbDa_RQp59PcHaxURSlqd5BJZQ7NTkQh_V-PbqIGMKHmtr23dyw/s1600-h/picture4.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 96px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5435070260289905298" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhICtNde5B-qn2OsLGYwAkqm-WXtodX6dFXeu03jEC0AMtCIlwzQgSzgoD9-i76otNg8vxR-UvKkkYyeCifPrseM7jVNYbDa_RQp59PcHaxURSlqd5BJZQ7NTkQh_V-PbqIGMKHmtr23dyw/s320/picture4.JPG" /></span></a><span style="font-family:verdana;"><br /><br />As you can see the master request column TIMES.CALENDAR_YEAR is filtered by dashboard prompt presentation variable. When the request is placed inside iframe the classic navigation with column filter set to is prompted is not working so we use presentation variable to pick up value from the dashboard prompt and place it in the master iframe request.<br /><br />Place current iframe column in narrattive view:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhi6UOrtX8nJGo3koocI0JebRDVxKcE0c3qV4dd8BPTKCqtYcpCogfPQ0TzC7fhcAVbzy4NWzl__FTy0TTSE5_Tm90Onwq-jxQovEPtH2RKkFqZkXX_bi069RQ_BqBzrP6No26lhxzEqe2-/s1600-h/picture8.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 154px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5435084888205991298" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhi6UOrtX8nJGo3koocI0JebRDVxKcE0c3qV4dd8BPTKCqtYcpCogfPQ0TzC7fhcAVbzy4NWzl__FTy0TTSE5_Tm90Onwq-jxQovEPtH2RKkFqZkXX_bi069RQ_BqBzrP6No26lhxzEqe2-/s320/picture8.JPG" /></span></a><span style="font-family:verdana;"><br /><br /><strong>Step three - HTML form text field and javascript events implementation on the master request, triggering detail request when validate master record</strong><br /><br />Column product category on the master contains complex detail request navigation:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgn02pWT2TxawGWu4p97h-m9ueKoZUko_y_ki0suBfxi1rFsiHa2MuniSW5VpIU4k6oo9vsLz3UwGF40jyFmISphecyquUtnO3dxx94c3CpkatlzKoy7KC21tJeF-uMxNdNWL3J8FnX3jsw/s1600-h/picture5.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 143px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5435075179860525778" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgn02pWT2TxawGWu4p97h-m9ueKoZUko_y_ki0suBfxi1rFsiHa2MuniSW5VpIU4k6oo9vsLz3UwGF40jyFmISphecyquUtnO3dxx94c3CpkatlzKoy7KC21tJeF-uMxNdNWL3J8FnX3jsw/s320/picture5.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Better view:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2i72VkAgLU3rpAcJEzudePcJbSEwJBYe6eoPohqL_k7P-o8lAX_bU9rkQeeA_cSIBkFs6IRhxMaXZedECI3ToKMtJzOxgzjcN0_0sD2Jv1jUune-kzBgx7fYQ74qj4VlNrjcgNFT5ZGqF/s1600-h/picture6.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 212px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5435082084088845042" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2i72VkAgLU3rpAcJEzudePcJbSEwJBYe6eoPohqL_k7P-o8lAX_bU9rkQeeA_cSIBkFs6IRhxMaXZedECI3ToKMtJzOxgzjcN0_0sD2Jv1jUune-kzBgx7fYQ74qj4VlNrjcgNFT5ZGqF/s320/picture6.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Explanation what we have done with the code above:<br /><br />We made form field for activating navigation, the text field is readonly. OnKeyDown javascript event disables backspace, delete and return keys to disallow user to change it (product category must be visible and not changed). Form text field need to be editable for triggering details. Enter and down-arrow key use tab key to validate next row. OnSelect javascript event opens detail request URL in the iframe and transfers all filters from the master request. OnClick javascript event select all in the text field (prevention if the user decides to click on the field). The focus is always in the master field. Finally we customize the form and hide editable functionality from the user.<br /><br /><strong>Step four - build the dashboard prompt and dashboard page</strong><br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuwq2CvHrZuDXXr3ezO-WvcPZO6cD8-rcPiR8r91HZXVgJwsKEPFVfCv_ZKZoNTPPw_TtApDPGB4LRy6D_Lj30D_uM9tDwgM86-xcGn8Pe7QJfh83O6ufugSlrj-01xgfr3EeUjWyl58dc/s1600-h/picture7.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 29px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5435082930244366242" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuwq2CvHrZuDXXr3ezO-WvcPZO6cD8-rcPiR8r91HZXVgJwsKEPFVfCv_ZKZoNTPPw_TtApDPGB4LRy6D_Lj30D_uM9tDwgM86-xcGn8Pe7QJfh83O6ufugSlrj-01xgfr3EeUjWyl58dc/s320/picture7.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Show only narrative view:<br /><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikpTG5KhsiN1OztnVMf2UzNL_bthyQXw1twTbImsmjk1Po0fPaAKVCIevFJZGQRA-wIdJKuwk014ESHRBX4Kxm8Ui1dYkzZiZ0srijMgO2dnS1ZV-FK4BD2ILtA1WYm56STQ4p1yk9l1O7/s1600-h/picture10.JPG"><img style="WIDTH: 320px; HEIGHT: 140px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5435094646437875794" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikpTG5KhsiN1OztnVMf2UzNL_bthyQXw1twTbImsmjk1Po0fPaAKVCIevFJZGQRA-wIdJKuwk014ESHRBX4Kxm8Ui1dYkzZiZ0srijMgO2dnS1ZV-FK4BD2ILtA1WYm56STQ4p1yk9l1O7/s320/picture10.JPG" /></a><br /><br /><strong>Step five - the final look and test</strong><br /><br />Initial:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVnXDtICo1eQmp6pSdL2fROLDRzsARMDJZj4qfr15Eref7YLKii5d_XkhmVblEVYD9wmM4147E8Hkj2JS1aXV7e9tzahCdQH2AH0YUsc9_qm2zDupneQmwt9ZRLUuJWLQW0F7scHDfT_QQ/s1600-h/picture9.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 222px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5435087272395969058" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVnXDtICo1eQmp6pSdL2fROLDRzsARMDJZj4qfr15Eref7YLKii5d_XkhmVblEVYD9wmM4147E8Hkj2JS1aXV7e9tzahCdQH2AH0YUsc9_qm2zDupneQmwt9ZRLUuJWLQW0F7scHDfT_QQ/s320/picture9.JPG" /></span></a><span style="font-family:verdana;"><br /><br />The position is on the editable field and the detail request is automatically refreshed. You can press enter, tab or down-arrow to cross into new master row and validate detail request record for the current master. The focus is on the same page because we use iframes, so we refresh only detail iframe.<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikWAG4ix3j49Leh3qg1f575N8eLjdmEtzdssjTrxIdc0aMILFZsk4ahoWkXuZ51jMfmEemw80NgvXrC8sa-OWt11HDgQQIKWEWqRYArUT67pvdv5FyVnRcZTB0co4aDP-80B1Q7YtcFw0c/s1600-h/picture11.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 223px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5435092222481366498" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikWAG4ix3j49Leh3qg1f575N8eLjdmEtzdssjTrxIdc0aMILFZsk4ahoWkXuZ51jMfmEemw80NgvXrC8sa-OWt11HDgQQIKWEWqRYArUT67pvdv5FyVnRcZTB0co4aDP-80B1Q7YtcFw0c/s320/picture11.JPG" /></span></a><span style="font-family:verdana;"><br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8CeMHmEGvxEs5GXyzvM6i_v-E-VW69QicQVb9Z8kqzYJr0ewS_1BBm57j5QyUrnCjzvzSwYXwQKk6BDCpjEdGTCUX07-_2B09WSx4SS88qXRNeaCZwe8iRtflUcarZ2WA-yUZy5ZwIsDz/s1600-h/picture12.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 222px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5435092297799910466" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8CeMHmEGvxEs5GXyzvM6i_v-E-VW69QicQVb9Z8kqzYJr0ewS_1BBm57j5QyUrnCjzvzSwYXwQKk6BDCpjEdGTCUX07-_2B09WSx4SS88qXRNeaCZwe8iRtflUcarZ2WA-yUZy5ZwIsDz/s320/picture12.JPG" /></span></a><span style="font-family:verdana;"><br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3Jwpdq0sXDE_Gw4krQHo_2335eOn2NWk4uhLHpMhmK9b8Y4emOdNKVU3T2zPMOhp_yEmd5vJQ38YnKIeTYoX2DIGjhVuKg1_sItJcth6p7kTx572BVocwujIXfIhgoEfA3_gzpr8EbE__/s1600-h/picture13.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 223px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5435092396294623618" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3Jwpdq0sXDE_Gw4krQHo_2335eOn2NWk4uhLHpMhmK9b8Y4emOdNKVU3T2zPMOhp_yEmd5vJQ38YnKIeTYoX2DIGjhVuKg1_sItJcth6p7kTx572BVocwujIXfIhgoEfA3_gzpr8EbE__/s320/picture13.JPG" /></span></a><span style="font-family:verdana;"><br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7ljlPbwqKnRNiSpQTDYnBS0FLGtemftS_C8tZQk_NgmNaTIggWJQOBFywkYk6pNKXas0bv0Xrm9W7yRPkjDhxY7P_zJ0vKdBPu53Sh0XlHR_hqwlTIFVCSwOQGQHuEMa7uaaFbu7fF8bX/s1600-h/picture14.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 223px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5435092482231544690" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7ljlPbwqKnRNiSpQTDYnBS0FLGtemftS_C8tZQk_NgmNaTIggWJQOBFywkYk6pNKXas0bv0Xrm9W7yRPkjDhxY7P_zJ0vKdBPu53Sh0XlHR_hqwlTIFVCSwOQGQHuEMa7uaaFbu7fF8bX/s320/picture14.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Unfortunately previous master row navigation can be established only using shift+tab or shift+enter keys.</span>Goran Ockohttp://www.blogger.com/profile/16571461599213456839noreply@blogger.com3tag:blogger.com,1999:blog-196729317318279460.post-38382465725900569032010-01-09T13:08:00.010+01:002010-01-12T14:20:50.620+01:00Loading HR employees in Essbase and reporting in OBIEE<span style="font-family:verdana;">This is my first post using Essbase, and Essbase-OBIEE. I'm playing with Essbase for a while and will publish something from time to time here on 108obiee.<br /><br />In this </span><a href="http://108obiee.blogspot.com/2009/11/denormalized-hr-employees-table-in.html"><span style="font-family:verdana;">post</span></a><span style="font-family:verdana;"> I showed how to handle unbalanced employees hierarchy using multiple logical table sources in dimension logical table, using relational source.<br /><br />Today I'll explain two different examples. In the first one there will be some basics how to load HR employees in Essbase BSO cube with using parent-child (value based, recursive dimension) member relationship and member consolidation method. But in the second example I'll be happy to get in Essbase the same as in this </span><a href="http://108obiee.blogspot.com/2009/11/denormalized-hr-employees-table-in.html"><span style="font-family:verdana;">post</span></a><span style="font-family:verdana;">:<br /><br />1. Unbalanced employees hierarchy<br />2. Data information for each employee - salary as well as the sum of salary first level down if the current employee is a manager and has employees under him<br /><br />I choose BSO data storage because I only have one dimension with not to many members (I don't count accounts dimension). Employees dimension will be tagged as sparse dimension and accounts dimension as dense and everything in this examples will be stored in the database/cube. In example two I'll use some calculations in BSO members, and for that Essbase is using Calculator, or Calc language. It's only for BSO outlines. For ASO outlines Essbase uses MDX language. There are very similar and you can translate Calculator Functions (BSO) to MDX Functions (ASO), for more information read Essbase Technical Reference.<br /><br /><strong>Example one - using parent member consolidation method to load member measure data into BSO cube</strong><br /><br />Lets make a simple OLAP model using EIS. We use Oracle HR as datatsource and add employees table as dimension table and user-defined table for a fact table, because we need to have fact table, if we don't we receive errors like no table is selected as a fact table and logical join is required in OLAP model, so we must have dimension and fact table to populate OLAP model.<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqq9ehbRnqE2AuGNbxUcsE53ogysabV0A9GQQ0H2ymcm69tzuOj3NGX_VC9LuS8Dw_1yk4DqixUYl6fZr2NhgOAC_O0P78JpprKmANAkjiVTZ-9NBTrx_ljCgYAitf3VH7k-cpgc_Zx49X/s1600-h/picture1.JPG"><span style="font-family:verdana;"><img style="WIDTH: 400px; HEIGHT: 237px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5422572039682864434" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqq9ehbRnqE2AuGNbxUcsE53ogysabV0A9GQQ0H2ymcm69tzuOj3NGX_VC9LuS8Dw_1yk4DqixUYl6fZr2NhgOAC_O0P78JpprKmANAkjiVTZ-9NBTrx_ljCgYAitf3VH7k-cpgc_Zx49X/s400/picture1.JPG" /></span></a><span style="font-family:verdana;"><br /><br />User-defined fact table:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDmzIyHB67GRsL6oun9zqQ9Ub-wsthNjA620NdOZS3ZvVGOwbtjU4q6dLvkqk41ZoZjvKQz0t1eTp05bWQw9Y4deLW03h4F2LvQnAicTVkn6NwVnF5Jnsf5m-3FSRjTDY0FyLjNWqp_dPA/s1600-h/picture2.JPG"><span style="font-family:verdana;"><img style="WIDTH: 400px; HEIGHT: 182px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5422572519389658914" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDmzIyHB67GRsL6oun9zqQ9Ub-wsthNjA620NdOZS3ZvVGOwbtjU4q6dLvkqk41ZoZjvKQz0t1eTp05bWQw9Y4deLW03h4F2LvQnAicTVkn6NwVnF5Jnsf5m-3FSRjTDY0FyLjNWqp_dPA/s400/picture2.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Employees dimension table and user-defined fact relation is 1:1. It's not really 1:N. I put this u-d fact table just to populate OLAP model and be able to made metaoutline later. Employees hierarchy is value-based (self referencial join). This kind of dimension is called recursive dimension.<br /><br />You can find great info about this in Oracle Essbase Integration Services Online Help.<br /><br />Recursive dimension:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgb_QS72ZCayWpCJw5GdI2Lfllp75HmVmGT-Xy1GhzPLyobilRGKny_6btzjsEhfVEoLvqyF1DXpNTZID7lGVkNGqohQHGdHlsWz0QIJJh_0DELqMM9korwxXOsw-IbaD8iFF8wp6aGc870/s1600-h/picture3.JPG"><span style="font-family:verdana;"><img style="WIDTH: 400px; HEIGHT: 336px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5422575453748261938" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgb_QS72ZCayWpCJw5GdI2Lfllp75HmVmGT-Xy1GhzPLyobilRGKny_6btzjsEhfVEoLvqyF1DXpNTZID7lGVkNGqohQHGdHlsWz0QIJJh_0DELqMM9korwxXOsw-IbaD8iFF8wp6aGc870/s400/picture3.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Logical join between employees dimension and fact:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCtvJEimIssMGaWw4xhh65gjPlJA4FWF5i_v0qLzpzNNDLHaHiS7L5jp8D2aK2QMaOKpz_gjjQ0XN_399mXvFPNCGdC7d2WCsEgK4KoROmQth31CXgY16-FeiVchdyKBfSZ2bMV9eb79MU/s1600-h/picture4.JPG"><span style="font-family:verdana;"><img style="WIDTH: 400px; HEIGHT: 288px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5422577954127397522" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCtvJEimIssMGaWw4xhh65gjPlJA4FWF5i_v0qLzpzNNDLHaHiS7L5jp8D2aK2QMaOKpz_gjjQ0XN_399mXvFPNCGdC7d2WCsEgK4KoROmQth31CXgY16-FeiVchdyKBfSZ2bMV9eb79MU/s400/picture4.JPG" /></span></a><span style="font-family:verdana;"><br /><br />EMPLOYEES.SALARY has SUM as aggregation rule as well as EMPLOYEES.DUMMY_MEASURE.<br /><br />At this point we save changes to our OLAP model and begin to create a metaotline with this OLAP model.<br /><br />I'm trying to find out what is the secret and how Essbase load the data into cube. I supose that because we have here parent-child relationship between the members the process of loading the data will take first the leaf level (the last level), level 0 in the employees hierarchy and try to find the data in the fact table via the logical join. If the level 0 member has data in the fact table the measure value and the cell will be populate. Now, because this dimension is sparse and this is the only dimension that I use in this example (I don't count account dimension which hold actually measures and it is defined as dense) I'll expect single-celled blocks (or two-celled blocks, because we have two measures) as much as we have members in our sparse employees dimension. In this example all level 0 members exists in the fact table so there will be no members with missing values in empty cells. After level 0 members are loaded the parent level members will be loaded into cube in upper level blocks according to consolidation rules in parent members.<br /><br />From the documentation we learned that Essbase stores data values in data blocks. Essbase creates a data block for each unique combination of sparse dimension members (providing that at least one data value exists for the combination). Each data block contains all the dense dimension member values for its unique combination of sparse dimension members. I our case for example, it creates one data block for the member 109 for example, which is level 0 employee member. This data block contains all measures (account values) for 109.<br /><br />This is how I setup my metaoutline:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEm5g-7YKrQdxlsTk-bukpcmVbXd8olt58N7WnzdXhqdn1cFU-ObIvwY71Qzu15Room_ydRedN75oj3Sfi797APzzZxvT_GVGuRLwvKA5szbqSQ1KSDNlUtpgHdEKBIFP0qy81QOh8wvRn/s1600-h/picture5.JPG"><span style="font-family:verdana;"><img style="WIDTH: 400px; HEIGHT: 247px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5422591537462157010" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEm5g-7YKrQdxlsTk-bukpcmVbXd8olt58N7WnzdXhqdn1cFU-ObIvwY71Qzu15Room_ydRedN75oj3Sfi797APzzZxvT_GVGuRLwvKA5szbqSQ1KSDNlUtpgHdEKBIFP0qy81QOh8wvRn/s400/picture5.JPG" /></span></a><span style="font-family:verdana;"><br /><br />I choose child column member EMPLOYEES.EMPLOYEE_ID to put in the employees dimension. With that I have a possibility to use child alias that refer to child member.<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3cu7NoyFDeYyGsIuXbn6MCui4YlvNMvgOUwoO9INNvqhTvgB1ZlkV4Kn7KIgFrJ611TvI_mCvf4qApohwPLKFvPwe5wsslx6agCfCrLgwij_g7KJsRub5GB9lcoeiVZQuPNwedL6FKtSZ/s1600-h/picture6.JPG"><span style="font-family:verdana;"><img style="WIDTH: 400px; HEIGHT: 336px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5422597118886688338" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3cu7NoyFDeYyGsIuXbn6MCui4YlvNMvgOUwoO9INNvqhTvgB1ZlkV4Kn7KIgFrJ611TvI_mCvf4qApohwPLKFvPwe5wsslx6agCfCrLgwij_g7KJsRub5GB9lcoeiVZQuPNwedL6FKtSZ/s400/picture6.JPG" /></span></a><span style="font-family:verdana;"><br /><br />We use EMPLOYEES.EMAIL alias for EMPLOYEES.EMPLOYEE_ID member.<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgieQfdcNrR0cM2hiYqUC4Awi5ness5vh2CjdLO8ddaqsDSOXaSll5ckPb7X3z4lbVm9QUs6JbQMt8cDngQKpfrGlyBfuJQnoLX-yhrZXpNHhPZTmU902dabE-SvQoVvrr4S-MuoqtYDdY1/s1600-h/picture7.JPG"><span style="font-family:verdana;"><img style="WIDTH: 400px; HEIGHT: 244px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5422597572857090706" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgieQfdcNrR0cM2hiYqUC4Awi5ness5vh2CjdLO8ddaqsDSOXaSll5ckPb7X3z4lbVm9QUs6JbQMt8cDngQKpfrGlyBfuJQnoLX-yhrZXpNHhPZTmU902dabE-SvQoVvrr4S-MuoqtYDdY1/s400/picture7.JPG" /></span></a><span style="font-family:verdana;"><br /><br />This is very basic setup and I didn't use any of advanced features in dimension or metaoutline properties.<br /><br />Note that I'm not using data rules to load data into Essbase cube, this I'll use in one of my future posts.<br /><br />Choose consolidation method addition and store data as data storage type for both measures:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcCAEeOP4wPTCUq2EjsKo_PVruTL-CFJ7U0lIf2XkRPmAtUpBgVYrBOYJr6uzImCkXdtBOXQxAdBp7EyIpJ0DSCl2lTfrtcsrBEc-d36_eovhHQV84btXBsH3JIvudCc6zxrubkBSmj_C6/s1600-h/picture8.JPG"><span style="font-family:verdana;"><img style="WIDTH: 400px; HEIGHT: 223px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5423314370888879298" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcCAEeOP4wPTCUq2EjsKo_PVruTL-CFJ7U0lIf2XkRPmAtUpBgVYrBOYJr6uzImCkXdtBOXQxAdBp7EyIpJ0DSCl2lTfrtcsrBEc-d36_eovhHQV84btXBsH3JIvudCc6zxrubkBSmj_C6/s400/picture8.JPG" /></span></a><span style="font-family:verdana;"><br /><br />The same properties we choose on the EMPLOYEES.EMPLOYEE_ID member properties, in the metaoutline.<br /><br />On the OLAP metaoutline properties we choose block storage as data storage option.<br /><br />Next step is to load members and the data:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXwAlXUjnG0rtEwl9wctBqq5-MaqLXo8NIA7OFRSLFvPCVerR28KQ5knx6AFOCkfbnbNPR46VB16qHVKk3kx2fwm0sgoyXND9EG3a59u0ki9Bk4o_AT7fB05k8nYUHy1TPXeURiZakjy8F/s1600-h/picture9.JPG"><span style="font-family:verdana;"><img style="WIDTH: 255px; HEIGHT: 379px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5423316072013288626" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXwAlXUjnG0rtEwl9wctBqq5-MaqLXo8NIA7OFRSLFvPCVerR28KQ5knx6AFOCkfbnbNPR46VB16qHVKk3kx2fwm0sgoyXND9EG3a59u0ki9Bk4o_AT7fB05k8nYUHy1TPXeURiZakjy8F/s400/picture9.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Loading results:<br /><br />SELECT<br />/*+ */<br />aa."MANAGER_ID",<br />aa."EMPLOYEE_ID",<br />aa."EMAIL"<br />FROM<br />HR.EMPLOYEES aa<br /><br />108 members have been added to dimension "EMPLOYEES".<br />2 members have been added to dimension "Accounts".<br />110 members have been added to outline.<br /><br />Dataload SQL 1:<br />SELECT<br />aa."EMPLOYEE_ID",<br />SUM(aa."SALARY"),<br />SUM(aa."DUMMY_MEASURE")<br />FROM<br />(<br />select<br />employee_id,<br />manager_id,<br />department_id,<br />job_id,<br />salary,<br />1 as dummy_measure<br />from employees<br />) aa<br />WHERE<br />aa."EMPLOYEE_ID" is NOT NULL<br />GROUP BY aa."EMPLOYEE_ID"<br /><br />If you want to query the server log after the loading process you may find this interesting:<br /><br />108 members have been added to dimension "EMPLOYEES".<br />2 members have been added to dimension "Accounts".<br />110 members have been added to outline.<br />EssbaseAPI: Declared Dimension Sizes = [109 3 ]<br />EssbaseAPI: Actual Dimension Sizes = [105 3 ]<br />EssbaseAPI: The number of Dynamic Calc Non-Store Members = [0 0 ]<br />EssbaseAPI: The number of Dynamic Calc Store Members = [0 0 ]<br />EssbaseAPI: The logical block size is [3]<br />EssbaseAPI: Maximum Declared Blocks is [109] with data block size of [3]<br />EssbaseAPI: Maximum Actual Possible Blocks is [105] with data block size of [3]<br />EssbaseAPI: Converted [105] index entries<br />Successfully completed Member load for metaoutline:Metaoutline3 Application:BSOHrApp DB:BSOHrDb User:admin (Records Loaded: 108, Records Rejected: 0)<br />EssbaseAPI: Data Load Updated [35] cells<br /><br />The next step is going to EAS/BSOHrDb database properties:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqG1Svf3T_04GHs0LxEXYG9ukaEB_pILAeLo5oFRcDqoa82zA9o5tWhSX5jFortH80IzKlw4kMcBSDBnX6ZjkBjhXN6wzCcG37YupWNHBcnIFJ4OGqzbcNu7CP0xG7TxWvlNoBgccByLHS/s1600-h/picture10.JPG"><span style="font-family:verdana;"><img style="WIDTH: 325px; HEIGHT: 219px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5423650198754711938" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqG1Svf3T_04GHs0LxEXYG9ukaEB_pILAeLo5oFRcDqoa82zA9o5tWhSX5jFortH80IzKlw4kMcBSDBnX6ZjkBjhXN6wzCcG37YupWNHBcnIFJ4OGqzbcNu7CP0xG7TxWvlNoBgccByLHS/s400/picture10.JPG" /></span></a><span style="font-family:verdana;"><br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpPE5UIqJy2O-2BAkTA2RSuVzaCyYrrK2jFT3noFc3sD8Lzn0JZExRqJ2Gb8pLQHHZUKb1_xkpc2RBLitJzkKFSmt3HV3RP9QH5wmyf6DG-93_w4R9S5FFra4B3NgyVFRVFwuglASFBvmA/s1600-h/picture11.JPG"><span style="font-family:verdana;"><img style="WIDTH: 343px; HEIGHT: 51px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5423650625084903858" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpPE5UIqJy2O-2BAkTA2RSuVzaCyYrrK2jFT3noFc3sD8Lzn0JZExRqJ2Gb8pLQHHZUKb1_xkpc2RBLitJzkKFSmt3HV3RP9QH5wmyf6DG-93_w4R9S5FFra4B3NgyVFRVFwuglASFBvmA/s400/picture11.JPG" /></span></a><span style="font-family:verdana;"><br /><br />One thing I don't understand here. It's said that 90 block are with level 0 and that is pretty clear because if you do a query:<br /><br />select count(*) from employees a<br />where not exists<br />(<br />select 1<br />from employees<br />where manager_id=a.employee_id<br />)<br />order by a.employee_id<br /><br />You'll get 90 leaf level rows.<br /><br />Count upper-level members:<br /><br />select<br />count(distinct manager_id)<br />from employees<br />where manager_id is not null<br /><br />You would get 18 rows but for some reason we get only 15 rows in the statistics tab in the database outline properties.<br /><br /><span style="color:#ff0000;">Note: when the upper generation member has only one generation member below itself (201-202, 205-206 and 102-103) Essbase will store only the second one (lower level, 202, 206 and 103), so this explain number of 15 upper-level blocks. Upper members 201, 205 and 102 are not stored.</span><br /><br />Employees preview in outline:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmYLH7bojRGYtlfOU4cVqXRRT0lmnMsec56mpjnq2G1yM3K71hVzjarW6Rl3paLnQAlE6zf6xItij6_R58Inlfe8_LXknCdsrIL80MMpzcTr3fjkFrFvK6XoEDmKWeTUIdnBVJabEVaQNE/s1600-h/picture12.JPG"><span style="font-family:verdana;"><img style="WIDTH: 296px; HEIGHT: 400px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5424468596703657922" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmYLH7bojRGYtlfOU4cVqXRRT0lmnMsec56mpjnq2G1yM3K71hVzjarW6Rl3paLnQAlE6zf6xItij6_R58Inlfe8_LXknCdsrIL80MMpzcTr3fjkFrFvK6XoEDmKWeTUIdnBVJabEVaQNE/s400/picture12.JPG" /></span></a><span style="font-family:verdana;"><br /><br />With this setup/load only the point one is satisfied:<br /><br />1. Unbalanced employees hierarchy<br />2. Data information for each employee - salary as well as the sum of salary first level down if the current employee is a manager and has employees under him<br /><br />The point two is not because:<br /><br />1. We have defined consolidation method addition on members and measures<br />2. Data is loaded first at lower 0 levels and then according to consolidation upper levels are loaded.<br /><br />Lets make a simple test in Answers after importing BSOHrApp and BSOHrDb into OBIEE Administrator and setup all thre layers correctly (don't forget to set hierarchy type of employees dimension to unbalanced).<br /><br />OBIEE Physical layer:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9bldXWVK1K1IAPojqbPdmT8aYzu-7bYW6RspoWaOISpGiI72qGO8QwkTVXlRuwJ9H7KUHI1aCk8m7YZPVcI4-YxgZv0R9b0HmFsLL1CT2Md9MUqR5dFs0guxe4LH5ng_4JEwrsBbN2V-r/s1600-h/picture14.JPG"><span style="font-family:verdana;"><img style="WIDTH: 301px; HEIGHT: 238px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5423984702556534546" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9bldXWVK1K1IAPojqbPdmT8aYzu-7bYW6RspoWaOISpGiI72qGO8QwkTVXlRuwJ9H7KUHI1aCk8m7YZPVcI4-YxgZv0R9b0HmFsLL1CT2Md9MUqR5dFs0guxe4LH5ng_4JEwrsBbN2V-r/s400/picture14.JPG" /></span></a><span style="font-family:verdana;"><br /><br />BMM:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLqcy6cA7hSOPL7RbD9Ge8lzELIH_Urjr0Tuo7XOEr2b-83zDpIdPbwsxjucJ7gm1G1LJT_Bpn0sOxITEF5wv_6QR6XBsDYkK3vlNZ0ABhbgXCL2wNxAcqhyphenhyphendqQbYcmx_oivPdqn0D__8-/s1600-h/picture28.JPG"><span style="font-family:verdana;"><img style="WIDTH: 289px; HEIGHT: 399px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5423985007849861554" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLqcy6cA7hSOPL7RbD9Ge8lzELIH_Urjr0Tuo7XOEr2b-83zDpIdPbwsxjucJ7gm1G1LJT_Bpn0sOxITEF5wv_6QR6XBsDYkK3vlNZ0ABhbgXCL2wNxAcqhyphenhyphendqQbYcmx_oivPdqn0D__8-/s400/picture28.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Test in Answers:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjoZj9uoooFbwDmBXqvvur-fDRmsSCDC9KFlCSMQUgcVcNuGWEq-pQxSrpdksemVTqeQF64aPkiyAWSBkpo741tkCnIXtaumYR2Kvv3cj1IqG__U5tH0dUwTARoEQF5QH7RtPBNvg7QMOkk/s1600-h/picture15.JPG"><span style="font-family:verdana;"><img style="WIDTH: 290px; HEIGHT: 55px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5423348080729248354" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjoZj9uoooFbwDmBXqvvur-fDRmsSCDC9KFlCSMQUgcVcNuGWEq-pQxSrpdksemVTqeQF64aPkiyAWSBkpo741tkCnIXtaumYR2Kvv3cj1IqG__U5tH0dUwTARoEQF5QH7RtPBNvg7QMOkk/s400/picture15.JPG" /></span></a><span style="font-family:verdana;"><br /><br />DUMMY_MEASURE counts how many leaf levels (0 levels) are under the current generation member passing through all the branches to the lowest level or lowest generation.<br /><br />Measure values at this generation (Gen2) are the result of the sum of the previous generations (Gen3):<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEix6HdcfKE0wMckTfd-YWHZyZodxTaqzNU1Y6foQXoHGqw0m6KZYghCLHoCf-_yR-qzSkcxurfk4m4C3OwzStsIG-rjltmf0vIkhRTN-rAa3pXXRJuCvzkXTfjdG1S75StwaF67eplNasOq/s1600-h/picture16.JPG"><span style="font-family:verdana;"><img style="WIDTH: 390px; HEIGHT: 323px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5423350439422071170" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEix6HdcfKE0wMckTfd-YWHZyZodxTaqzNU1Y6foQXoHGqw0m6KZYghCLHoCf-_yR-qzSkcxurfk4m4C3OwzStsIG-rjltmf0vIkhRTN-rAa3pXXRJuCvzkXTfjdG1S75StwaF67eplNasOq/s400/picture16.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Drill to the generation 4 employees:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjst7KSxsEkPWJBKXnpD99z4P9o2AEtWttxOt8-Ieikjo-c2yK3BDaKGoZduvGJnuOM8o47YBtyjbSnq7Ejz7NpFYQwXe_zziuDD_Rd8Dew7gPrb6hMeelMre_J_gH2JvfNal_Pb-pdI4VE/s1600-h/picture17.JPG"><span style="font-family:verdana;"><img style="WIDTH: 400px; HEIGHT: 107px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5423352446977199042" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjst7KSxsEkPWJBKXnpD99z4P9o2AEtWttxOt8-Ieikjo-c2yK3BDaKGoZduvGJnuOM8o47YBtyjbSnq7Ejz7NpFYQwXe_zziuDD_Rd8Dew7gPrb6hMeelMre_J_gH2JvfNal_Pb-pdI4VE/s400/picture17.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Drill to generation 5 employees from SHIGGINS (employee_id=205):<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi79HWMEbjZ73xnuHdrtN8tKFeehiAbvteSR6XLHN6RamYnFEBFvbzAAOrIgF3tyEICAuzyl7_KPcNH66LdEoE-xS-WICd0yQA85MGUV4KR2CLcvJd9TPi1QVlTzVvIH-x-YEUrRNlojCvy/s1600-h/picture18.JPG"><span style="font-family:verdana;"><img style="WIDTH: 400px; HEIGHT: 39px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5423354799439636050" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi79HWMEbjZ73xnuHdrtN8tKFeehiAbvteSR6XLHN6RamYnFEBFvbzAAOrIgF3tyEICAuzyl7_KPcNH66LdEoE-xS-WICd0yQA85MGUV4KR2CLcvJd9TPi1QVlTzVvIH-x-YEUrRNlojCvy/s400/picture18.JPG" /></span></a><span style="font-family:verdana;"><br /><br />It seems like SHIGGINS and WGIETZ have same values for both measures which is correct because there is only one level under the SHIGGINS and it summarize data below him.<br /><br />The same is for LDEHAAN and AHUNOLD:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFEpGkCCLlLI2KczMKeT7qFZT6vevsyfxcQVMZS4HT26OYAdaWSpmxXfZF45Ltxdi7TP-rNzesQ7zGRnRapQZ_SRhrnvatupWA_8-5Ue-W62q-tZ2HkiiEMpUDucQ95aZBaXuPtWVEbln6/s1600-h/picture19.JPG"><span style="font-family:verdana;"><img style="WIDTH: 400px; HEIGHT: 48px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5423357874813904466" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFEpGkCCLlLI2KczMKeT7qFZT6vevsyfxcQVMZS4HT26OYAdaWSpmxXfZF45Ltxdi7TP-rNzesQ7zGRnRapQZ_SRhrnvatupWA_8-5Ue-W62q-tZ2HkiiEMpUDucQ95aZBaXuPtWVEbln6/s400/picture19.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Ok, that is for this example in which we showed how Essbase load the data and how the upper levels are loaded according consolidation (addition in our case) method.<br /><br /><strong>Example two - loading raw HR employees data into BSO cube without using consolidation method in measures and members, showing employees salary and sum of the salary first level down</strong><br /><br />Make a new OLAP model in EIS:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuUfe7vNdtTrVBly65LgBL8Owta1jMvWhXQN6EF7X_HwTBaKOm79sSMZqV0eQX53SoRmV30MQNzlLgpGqujSoS6XEqRN26S3mIRzDx3AR7JBbC1y06XlR8_T50qJSeTJIz1E8_YvhkNAI4/s1600-h/picture20.JPG"><span style="font-family:verdana;"><img style="WIDTH: 400px; HEIGHT: 282px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5423617982461560946" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuUfe7vNdtTrVBly65LgBL8Owta1jMvWhXQN6EF7X_HwTBaKOm79sSMZqV0eQX53SoRmV30MQNzlLgpGqujSoS6XEqRN26S3mIRzDx3AR7JBbC1y06XlR8_T50qJSeTJIz1E8_YvhkNAI4/s400/picture20.JPG" /></span></a><span style="font-family:verdana;"><br /><br />It is very similar like the previous model except we changed the code in user-defined fact table:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_zrNvQKxFXD0JvJrIcQjr1N68BTRum2fGfFaSsxju-HOxFOPDtF2fFp80TDUfgT-gxN_SWUh_LZxzJbXwXNtzAmHWlS_I6QCcT7ImTkzdKHUuDvkoM0oe435MgVPbJ2GW2hkfFLh0ssM8/s1600-h/picture21.JPG"><span style="font-family:verdana;"><img style="WIDTH: 400px; HEIGHT: 208px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5423618977635360658" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_zrNvQKxFXD0JvJrIcQjr1N68BTRum2fGfFaSsxju-HOxFOPDtF2fFp80TDUfgT-gxN_SWUh_LZxzJbXwXNtzAmHWlS_I6QCcT7ImTkzdKHUuDvkoM0oe435MgVPbJ2GW2hkfFLh0ssM8/s400/picture21.JPG" /></span></a><span style="font-family:verdana;"><br /><br />select<br />employee_id,<br />manager_id,<br />salary,<br />cast(null as NUMBER) as sum_salary_first_level_down<br />from employees<br /><br />And we set aggregation rule for both fact measures to NONE:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicPvnc1u1ZWdrhYEuXhBmT505x3pV2lsVW0lnUnEz0V41qU_GoJfyLWy9RGr6qOraAv-kOOCMA7oWzmh2Wwsb_-PJiTwn-ea2QnsurOcdx2f6JYWjiaDwg4SWqR-9EdHbDa7kLueh4WTgR/s1600-h/picture22.JPG"><span style="font-family:verdana;"><img style="WIDTH: 259px; HEIGHT: 296px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5423619909796406946" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicPvnc1u1ZWdrhYEuXhBmT505x3pV2lsVW0lnUnEz0V41qU_GoJfyLWy9RGr6qOraAv-kOOCMA7oWzmh2Wwsb_-PJiTwn-ea2QnsurOcdx2f6JYWjiaDwg4SWqR-9EdHbDa7kLueh4WTgR/s400/picture22.JPG" /></span></a><span style="font-family:verdana;"><br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpMdKS66TuvsLrbVaJgYDx0eCc8hP__22XxO3lT0tas6vOHxp4QspTwuRh318UcCzvXwgX8I5ZkuzZTbo0GSQSlFcLATlDKyhii6qDpLDLcRY6RY3Vi3HXuWBKBY7y6nO7IMyDNgToVzFp/s1600-h/picture23.JPG"><span style="font-family:verdana;"><img style="WIDTH: 250px; HEIGHT: 296px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5423620015021196882" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpMdKS66TuvsLrbVaJgYDx0eCc8hP__22XxO3lT0tas6vOHxp4QspTwuRh318UcCzvXwgX8I5ZkuzZTbo0GSQSlFcLATlDKyhii6qDpLDLcRY6RY3Vi3HXuWBKBY7y6nO7IMyDNgToVzFp/s400/picture23.JPG" /></span></a><span style="font-family:verdana;"><br /><br />The reason why we remove the aggregation rule from both measures is that we want to load raw data into Essbase BSO cube, salary for each employee and the sum of the salary first level down. We need to be sure that no aggregation is used in that case. In the example one we showed how aggregation and member consolidation work.<br /><br /><span style="color:#ff0000;">Note: the alternative for showing each employee salary is to define attribute dimension with the salary attribute and then associate it with the employees dimension but I don't want to associate manually salary to each employee member in EAS and I can associate attribute member to only level zero employees members so this solution is not good.</span><br /><br />I use cast(null as NUMBER) as sum_salary_first_level_down in the user-defined fact table to pre-define measure so I can use it in the EIS metaoutline to write some formula that will calculate sum_salary_first_level_down and store it in the cube as separate measure, along with the salary measure, which presents employee salary.<br /><br />Metaoutline:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVSxq-MI2BZPBoUFJHczXBinQmxNUT7g2m2YMn5K4AEypP2tR0w9ZlGdXlFXrlkLXZhVYlUfPc-NPthJb2X00cHsi9tI5g6iFfGpKKPLPVEdhBIvOlWuWCRB_gQlEM9J3mQGlWdf_BQMeH/s1600-h/picture24.JPG"><span style="font-family:verdana;"><img style="WIDTH: 400px; HEIGHT: 202px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5423634431404250034" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVSxq-MI2BZPBoUFJHczXBinQmxNUT7g2m2YMn5K4AEypP2tR0w9ZlGdXlFXrlkLXZhVYlUfPc-NPthJb2X00cHsi9tI5g6iFfGpKKPLPVEdhBIvOlWuWCRB_gQlEM9J3mQGlWdf_BQMeH/s400/picture24.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Set consolidation to ignore (~), on all members:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXEK1ps4l4RpOtj0Az5Qw-FIcFurtAWFTpDmA928UgJtQMCeyxQqDztFJT-EalO-HMbabJf0laQl4X400yphleHeYoXecZ8Fu8xImzXeILj5AOz5mMe6rWnjBUrtVCqJuWm59FIEZQhOFQ/s1600-h/picture25.JPG"><span style="font-family:verdana;"><img style="WIDTH: 182px; HEIGHT: 118px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5423633571822427842" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXEK1ps4l4RpOtj0Az5Qw-FIcFurtAWFTpDmA928UgJtQMCeyxQqDztFJT-EalO-HMbabJf0laQl4X400yphleHeYoXecZ8Fu8xImzXeILj5AOz5mMe6rWnjBUrtVCqJuWm59FIEZQhOFQ/s400/picture25.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Both measures have data storage set to store data.<br /><br />Open the sum_salary_first_level_down member properties and in the formula tab enter the calculation formula:<br /><br />@SUMRANGE("SALARY",@RELATIVE(@CURRMBR("EMPLOYEES"),@CURGEN("EMPLOYEES")+1));<br /><br />This will calculate desired sum.<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiaGa3pggSgmgDtEQ2KKkuicqc6FJiXi2jUZo2iYUvlrZ3HjsiG2V-gf0Jy8mgoJugJU6u773N2X6P7yPAFx75_xk3Z3hjNEabKw8opvw9OPWIj8rN88MtTg9QAbwGT7lyOd7UAXi_wud4A/s1600-h/picture26.JPG"><span style="font-family:verdana;"><img style="WIDTH: 400px; HEIGHT: 224px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5423636459011079602" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiaGa3pggSgmgDtEQ2KKkuicqc6FJiXi2jUZo2iYUvlrZ3HjsiG2V-gf0Jy8mgoJugJU6u773N2X6P7yPAFx75_xk3Z3hjNEabKw8opvw9OPWIj8rN88MtTg9QAbwGT7lyOd7UAXi_wud4A/s400/picture26.JPG" /></span></a><span style="font-family:verdana;"><br /><br />After loading members and data we go to EAS, refresh application list and query our new database/cube properties:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhxeSKiFqaJ9G5bqkRraS1cfEhelFMXGYwmUD_MaIBH3U3OJCjhId8B6pM1ywoHGqNXmEXAnm3idLgi5e6Ba4Jdjdjy7NVV5RbMhe38O4Eb728NppZ-fumqRPcRxlQheJxqGy3jbfwFwg7/s1600-h/picture27.JPG"><span style="font-family:verdana;"><img style="WIDTH: 328px; HEIGHT: 220px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5423644986493485570" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhxeSKiFqaJ9G5bqkRraS1cfEhelFMXGYwmUD_MaIBH3U3OJCjhId8B6pM1ywoHGqNXmEXAnm3idLgi5e6Ba4Jdjdjy7NVV5RbMhe38O4Eb728NppZ-fumqRPcRxlQheJxqGy3jbfwFwg7/s400/picture27.JPG" /></span></a><span style="font-family:verdana;"><br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinBBfIr_9kvSxXTEwwWBIyN76qCcb2rlL8uax7oJd9ExUU8rVeu5Cd4FuPHEeF2sPJdWHmmGsLcOPlGdPCJP6gqrGwizQ9-DMc3_tRMCx5QW99_YveToasdc8umedqv1vgTyyI2RHq3Fqv/s1600-h/picture31.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 43px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5424479377755810338" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinBBfIr_9kvSxXTEwwWBIyN76qCcb2rlL8uax7oJd9ExUU8rVeu5Cd4FuPHEeF2sPJdWHmmGsLcOPlGdPCJP6gqrGwizQ9-DMc3_tRMCx5QW99_YveToasdc8umedqv1vgTyyI2RHq3Fqv/s320/picture31.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Level 0 and upper-level block numbers are correct.<br /><br />EAS outline:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsYFRXii9VP_Nwwyrb5Ma2iSWRBfDXE57tdPSLK8Nfg2PuuRi7YlP1Rg3rOicgjX2BsudMZfdxH4a-rUZB22pHcvFi2jJRVc0TDoAvxzpypDeSui5HEs1ds1OfWEt0AkVN89qq2LXAbrqy/s1600-h/picture28.JPG"><span style="font-family:verdana;"><img style="WIDTH: 400px; HEIGHT: 171px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5424473625115433330" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsYFRXii9VP_Nwwyrb5Ma2iSWRBfDXE57tdPSLK8Nfg2PuuRi7YlP1Rg3rOicgjX2BsudMZfdxH4a-rUZB22pHcvFi2jJRVc0TDoAvxzpypDeSui5HEs1ds1OfWEt0AkVN89qq2LXAbrqy/s400/picture28.JPG" /></span></a><span style="font-family:verdana;"><br /><br />See that members are not using consolidation so we expect raw data in the cube. BSO Calculator formula which we have defined in the EIS is visible on the sum_salary_first_level_down:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDWSYwXrWPJUC5qv6UKnq4oVVIC1sx0hNasiU-cGosHsYODEFRSa6NIV9oMr8DbTuzQr0HmRS_zhB-3WXkP_iVYNS2EvQVpVS9nGbIoVv3Qc2GDI7AImnYdVhi3RiTnppSMEpRFRbEhejX/s1600-h/picture29.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 62px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5424476064155563602" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDWSYwXrWPJUC5qv6UKnq4oVVIC1sx0hNasiU-cGosHsYODEFRSa6NIV9oMr8DbTuzQr0HmRS_zhB-3WXkP_iVYNS2EvQVpVS9nGbIoVv3Qc2GDI7AImnYdVhi3RiTnppSMEpRFRbEhejX/s320/picture29.JPG" /></span></a><span style="font-family:verdana;"><br /><br />The first cube preview in EAS looks fine, 24000 is the salary of the employee_id 100 (SKING) and 170400 summarize salary first level down:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXGMVh0MeYuYzsRZZ5DWpTQ0kC3nCsC3PpvAQ4GU-Gw8LYWR_lNbvLJflVdp1aiDhWltOSBan0dqJ9-t_GhYIEIvgIbU3V7Mh_vTME5QKXWYuADl-PjrTRlDsAJTWVodQmrLBrtikqm_Q6/s1600-h/picture32.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 134px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5424482532600051266" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXGMVh0MeYuYzsRZZ5DWpTQ0kC3nCsC3PpvAQ4GU-Gw8LYWR_lNbvLJflVdp1aiDhWltOSBan0dqJ9-t_GhYIEIvgIbU3V7Mh_vTME5QKXWYuADl-PjrTRlDsAJTWVodQmrLBrtikqm_Q6/s320/picture32.JPG" /></span></a><span style="font-family:verdana;"><br /><br />If you drill to the first level down:<br /><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEideTa8kJ6v1Lm2rNFbHHv1m6LC-nAvTaRvrtIBqnPIdiZwWz7_0HhWNWtEF0ymehu7FGAKoPtM8Gf9WEOPI9qbc-qjFoOtS-ODagqjfBE296fasEZkGdhkWK7pjVeLoDaUZsDxZWrxb0Js/s1600-h/picture33.JPG"><img style="WIDTH: 320px; HEIGHT: 246px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5424712320494076178" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEideTa8kJ6v1Lm2rNFbHHv1m6LC-nAvTaRvrtIBqnPIdiZwWz7_0HhWNWtEF0ymehu7FGAKoPtM8Gf9WEOPI9qbc-qjFoOtS-ODagqjfBE296fasEZkGdhkWK7pjVeLoDaUZsDxZWrxb0Js/s320/picture33.JPG" /></a><br /><br />Quick test in Answers (after importing a cube into BI Administration):<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUmSnR4QbRwNMx1F8AIBsel9957f40qkl2802-_gqqGRASx540ut-jCeVKuKYLRaWYDwN43OiSxZOdFtsYZ5mJTAKls6nq9Bviv4nn42hTY07Qo3IcHItPqDG3-9N6evZvG8eEiTmu4b8-/s1600-h/picture34.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 54px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5424493246690466034" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUmSnR4QbRwNMx1F8AIBsel9957f40qkl2802-_gqqGRASx540ut-jCeVKuKYLRaWYDwN43OiSxZOdFtsYZ5mJTAKls6nq9Bviv4nn42hTY07Qo3IcHItPqDG3-9N6evZvG8eEiTmu4b8-/s320/picture34.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Drill down to generation 3 members:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuoQ8kolkWRcA9trXdXOX71RPA1wbIbjx12oC8HuYJhB5cDLfQeVe5066rldrtghBpzbDXyYAfbP7Y-PXm9nc0Un6c5wqd7D5YpkaOyutdjgS5ZQL639w_zsHwYU8I5HjmM8taHtAsH3j_/s1600-h/picture35.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 229px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5424493363393117010" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuoQ8kolkWRcA9trXdXOX71RPA1wbIbjx12oC8HuYJhB5cDLfQeVe5066rldrtghBpzbDXyYAfbP7Y-PXm9nc0Un6c5wqd7D5YpkaOyutdjgS5ZQL639w_zsHwYU8I5HjmM8taHtAsH3j_/s320/picture35.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Drill down to generation 4 members:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5xrxdjNLYQurBGIGlfPuY7jSaHas0OMxYtRJkZb52DgJMuJAkuilt2LdN7flYhf6sDbV2RAajvyGGhA7ifdFFxIpFbG_cUlj3wqmSzOHqSK0bZjo0pXW3dnz5nqZER8lETnco_4l4uBC-/s1600-h/picture36.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 78px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5424493697731144146" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5xrxdjNLYQurBGIGlfPuY7jSaHas0OMxYtRJkZb52DgJMuJAkuilt2LdN7flYhf6sDbV2RAajvyGGhA7ifdFFxIpFbG_cUlj3wqmSzOHqSK0bZjo0pXW3dnz5nqZER8lETnco_4l4uBC-/s320/picture36.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Drill down to generation 5 members:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWpQKnVF4my5R9zd9Lu85z933gFvSZIAi2wKIlfa-LDSk9-FgL1zwFZuIXGSX2jI-smhHqWQ-LUmv55r4n1KL9ICmnZ0qXGIxLLZOWjD2DP20Bs2fetxygASNiq_Yy-WPYa1KSJF7f-ge2/s1600-h/picture37.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 65px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5424494401993148242" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWpQKnVF4my5R9zd9Lu85z933gFvSZIAi2wKIlfa-LDSk9-FgL1zwFZuIXGSX2jI-smhHqWQ-LUmv55r4n1KL9ICmnZ0qXGIxLLZOWjD2DP20Bs2fetxygASNiq_Yy-WPYa1KSJF7f-ge2/s320/picture37.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Note that in all part drills the sum of the salary (grand total) matchs the sum_salary_first_level_down in the previous generation member, so we got the desired result. </span>Goran Ockohttp://www.blogger.com/profile/16571461599213456839noreply@blogger.com0tag:blogger.com,1999:blog-196729317318279460.post-64258166803843147442009-11-26T08:01:00.008+01:002009-11-27T21:22:05.659+01:00Aggregates outside OBIEE - materialized views and query rewrite<span style="font-family:verdana;">In this </span><a href="http://108obiee.blogspot.com/2009/10/aggregates-in-obiee.html"><span style="font-family:verdana;">post</span></a><span style="font-family:verdana;"> I explained how to use aggregates in OBIEE. Then we did manually create aggregate tables on the database and set each logical table source to triggering only on the certain level of dimension.
<br />
<br />We then used aggregate tables SALES_MONTHS, SALES_YEAR_CAT and SALES_MONTHS_CAT_CH and dimension tables CATEGORIES, MONTHS i YEARS. Here, we don't need that.
<br />
<br />In this post we'll try to explain and set up materialized views and the query rewrite to get the same queries as in the post above, but without setting anything in the BMM in the logical table sources.
<br />
<br />I'll use oracle 10g database, oracle SH schema and the measure from the SALES fact table.
<br />
<br />For using dbms_mview.explain_rewrite we need to have rewrite_table table (file utlxplan.sql) and for dbms_mview.explain_mview table mv_capabilities_table (file utlxmv.sql).
<br />
<br />First set:
<br />
<br />ALTER SYSTEM SET QUERY_REWRITE_ENABLED=TRUE
<br />ALTER SYSTEM SET QUERY_REWRITE_INTEGRITY='TRUSTED'
<br />
<br />This is the level of the query rewrite. I set TRUSTED only to be able to test this. You should see other options as well. In TRUSTED mode, the optimizer trusts that the relationships declared in dimensions and RELY constraints are correct. In this mode, the optimizer also uses prebuilt materialized views or materialized views based on views, and it uses relationships that are not enforced as well as those that are enforced. In this mode, the optimizer also trusts declared but not ENABLED VALIDATED primary or unique key constraints and data relationships specified using dimensions. This mode offers greater query rewrite capabilities but also creates the risk of incorrect results if any of the trusted relationships you have declared are incorrect (Text reference: </span><a href="http://download.oracle.com/docs/cd/B28359_01/server.111/b28313/qrbasic.htm"><span style="font-family:verdana;">Oracle Database Data Warehousing Guide 11g Release 1 (11.1)</span></a><span style="font-family:verdana;">).
<br />
<br />RELY constraints:
<br />
<br />We use SALES table as the reference. Existing constraints we need to modify to RELY. RELY only affects those constraints that are ENABLE NOVALIDATE. Parameter QUERY_REWRITE_INTEGRITY is set to TRUSTED (TRUSTED informations are constraints (NOVALIDATE RELY) and dimensions). Oracle will not do the check whether relationships defined with RELY constraints are TRUE. That refers to primary key and unique key constraints (RELY ENABLE NOVALIDATE). Query rewrite also use joinback method for recognition attribute that is not in the materialized view query but can be retrieved with joinback. For example, the query rewrite materialized view has CALENDAR_MONTH_ID and we want to group by CALENDAR_MONTH_DESC and then the query optimizer make the join between materialized view and the TIMES table one more to get CALENAR_MONTH_DESC. TIMES table is joinback table.
<br />
<br />Because of the connection with the higher levels we need to have dimensions:
<br />
<br /></span></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhROen8RV0P_xWL3Wl3jzlo_xXw21FB7yHLWmxcIlazMtZF6oHcOPCxtazKlR9qackIDehY2wK7KtxCwBqSx-SqRSE5cGV7qa9vbEEE8XrFs0AqYjoOjX7C9gr2YcMkskbwSGRhC1n-VIs/s1600-h/picture166.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 121px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5298576291725762114" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhROen8RV0P_xWL3Wl3jzlo_xXw21FB7yHLWmxcIlazMtZF6oHcOPCxtazKlR9qackIDehY2wK7KtxCwBqSx-SqRSE5cGV7qa9vbEEE8XrFs0AqYjoOjX7C9gr2YcMkskbwSGRhC1n-VIs/s320/picture166.JPG" /></span></a><span style="font-family:verdana;">
<br />
<br />I didnt create them, they are already on the oracle SH schema.
<br />
<br />Modify all SALES table constraints to RELY ENABLE NOVALIDATE:
<br />
<br />alter table sales modify constraint sales_product_fk RELY ENABLE NOVALIDATE
<br />alter table sales modify constraint sales_channel_fk RELY ENABLE NOVALIDATE
<br />alter table sales modify constraint sales_time_fk RELY ENABLE NOVALIDATE
<br />alter table products modify constraint products_pk RELY ENABLE NOVALIDATE
<br />alter table times modify constraint times_pk RELY ENABLE NOVALIDATE
<br />alter table channels modify constraint channels_pk RELY ENABLE NOVALIDATE
<br />
<br />We create materialized view to support all queries like in the </span><a href="http://108obiee.blogspot.com/2009/10/aggregates-in-obiee.html"><span style="font-family:verdana;">post</span></a><span style="font-family:verdana;">:
<br />
<br />create materialized view mv_sales_all
<br />build immediate
<br />refresh force on demand
<br />with primary key
<br />enable query rewrite
<br />as
<br />select t.calendar_month_id,
<br />s.prod_id,
<br />s.channel_id,
<br />grouping_id(t.calendar_month_id, s.prod_id, s.channel_id) as gr_id,
<br />sum(s.amount_sold) as amount_sold,
<br />sum(s.quantity_sold) as quantity_sold
<br />from sales s, times t
<br />where s.time_id=t.time_id
<br />group by
<br />grouping sets
<br />(
<br />(t.calendar_month_id),--gr_id 3
<br />(t.calendar_month_id,s.prod_id), --gr_id 1
<br />(t.calendar_month_id,s.prod_id,s.channel_id)--gr_id 0
<br />)
<br />
<br />In the grouping sets we support all three combinations like in the </span><a href="http://108obiee.blogspot.com/2009/10/aggregates-in-obiee.html"><span style="font-family:verdana;">post</span></a><span style="font-family:verdana;">.
<br />
<br />Grouping_id function will get the decimal interpretation of the binary. If the attribute gives the contribution to aggregation then the value is 0, otherwise it is 1.
<br />
<br />For example, calendar_month_id has value 3 because it's in the combination:
<br />
<br />(0, 1, 1) = (calendar_month_id, prod_id, channel_id)
<br />
<br />Check:
<br />
<br />select bin_to_num(0, 1, 1) from dual--3 decimal
<br />select bin_to_num(0, 0, 0) from dual--0 decimal
<br />select bin_to_num(0, 0, 1) from dual--1 decimal
<br />
<br />Example of combinations:
<br />
<br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7rcARNcaCk5o4Ubk0euNFTAJt8z39CREgNuF9YR9Sbc3_eY1ViqG9PEcoC5CbbrskxtRQj5cFNBfZXHbJ9TCFStMMYQVAQplJpSLNsiZ-ipkoeZzvzdma8hq35OnVbHGPdZN93qyFxwQ/s1600-h/picture160.jpg"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 118px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5296441459250914626" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7rcARNcaCk5o4Ubk0euNFTAJt8z39CREgNuF9YR9Sbc3_eY1ViqG9PEcoC5CbbrskxtRQj5cFNBfZXHbJ9TCFStMMYQVAQplJpSLNsiZ-ipkoeZzvzdma8hq35OnVbHGPdZN93qyFxwQ/s320/picture160.jpg" /></span></a><span style="font-family:verdana;">
<br />
<br />To explain materialized view query we use the table mv_capabilities_table and the procedure dbms_mview.explain_mview.
<br />
<br />BMM (clean model):
<br />
<br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqJmyVMCdlna4WD_UPNll7tBo4GstNm2piHB3muGXUUaAg_dexNDD_jpECoJ2QidM4juupSS04axkcD9XIwn2VS_FFPX906q0hmCPebpdcgW88auIqeblVs-y-889HlynStUpiYzJ7WVc/s1600-h/picture161.jpg"><span style="font-family:verdana;"><img style="WIDTH: 169px; HEIGHT: 320px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5296447745619727186" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqJmyVMCdlna4WD_UPNll7tBo4GstNm2piHB3muGXUUaAg_dexNDD_jpECoJ2QidM4juupSS04axkcD9XIwn2VS_FFPX906q0hmCPebpdcgW88auIqeblVs-y-889HlynStUpiYzJ7WVc/s320/picture161.jpg" /></span></a><span style="font-family:verdana;">
<br />
<br />The focus is on how this works with queries that OBIEE generates, not how to refresh materialized views during the part of the job of the ETL process.
<br />
<br />To test this we need to refresh materialized view:
<br />
<br />begin
<br />dbms_snapshot.refresh('MV_SALES_ALL','C');
<br />end;
<br />
<br />Get schema statistics:
<br />
<br />begin
<br />dbms_stats.gather_schema_stats('SH', CASCADE=>TRUE);
<br />end;
<br />
<br />Now, if we choose:
<br />
<br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2p8NCLKvULxW_uk1W-FftRlXYgAudiA92K1ZSSqciaj3u61Eh6sR9QPkSMV51O9MLB3EAo78u9RwT7uFsliMmKdrYza5hHhsKqt5S-vPvjLTD-CwtcdtVeFuHzoR6iFFwdNgGtMr_thI/s1600-h/picture152.jpg"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 61px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5295969710266353506" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2p8NCLKvULxW_uk1W-FftRlXYgAudiA92K1ZSSqciaj3u61Eh6sR9QPkSMV51O9MLB3EAo78u9RwT7uFsliMmKdrYza5hHhsKqt5S-vPvjLTD-CwtcdtVeFuHzoR6iFFwdNgGtMr_thI/s320/picture152.jpg" /></span></a><span style="font-family:verdana;">
<br />
<br />NQQuery.log:
<br />
<br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQWYhRMYc4UPpzCweFi65RT1cxTDRyHvgfscCF10GoprCatDSIJa0dY3fbiJW9CDPqjmFQJwyZSd-0zFZZarZktc28uBhgMLoQhE8zOfeQjqOFyHM0UKE0bNdAQn9PWuy4iErbsmVHLH8/s1600-h/picture162.jpg"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 116px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5296449278658628498" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQWYhRMYc4UPpzCweFi65RT1cxTDRyHvgfscCF10GoprCatDSIJa0dY3fbiJW9CDPqjmFQJwyZSd-0zFZZarZktc28uBhgMLoQhE8zOfeQjqOFyHM0UKE0bNdAQn9PWuy4iErbsmVHLH8/s320/picture162.jpg" /></span></a><span style="font-family:verdana;">
<br />
<br />Explain plan, table plan_table:
<br />
<br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6RBgiIy5aW7nffLuTma3QMiYSwC3OfdKO7wnUZvy8gHJVgTppzI_V-fctzJZoMqWvR4kO7Uar-zLQAj-HfUVuZ0rr8MVeXbl9DzuHYmMgUMfeaTfXHxLnIBbDtonzFAqT6D-xfkHnTR8/s1600-h/picture163.jpg"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 221px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5296461731921227458" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6RBgiIy5aW7nffLuTma3QMiYSwC3OfdKO7wnUZvy8gHJVgTppzI_V-fctzJZoMqWvR4kO7Uar-zLQAj-HfUVuZ0rr8MVeXbl9DzuHYmMgUMfeaTfXHxLnIBbDtonzFAqT6D-xfkHnTR8/s320/picture163.jpg" /></span></a><span style="font-family:verdana;">
<br />
<br />See the joinback to TIMES table to get the CALENDAR_MONTH_DESC.
<br />
<br />If we instead of CALENDAR_MONTH_DESC put the CALENDAR_MONTH_ID there is no joiback to TIMES because we use CALENDAR_MONTH_ID which is already in the materialized view query.
<br />
<br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhef3nVay1XMkwFNlQExuUYzVAtx2fEm_doSbnBe5iW872U_4YI5Ev1oMVmEis1iFX6gPqyePKKCfIXTOtNRT1t_9UQTscShL_7zRDxOaFVtNHkWLsMRfDJ4UpCaMDLD7wab6qPrWk8Tro/s1600-h/picture164.jpg"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 185px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5296459840588542754" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhef3nVay1XMkwFNlQExuUYzVAtx2fEm_doSbnBe5iW872U_4YI5Ev1oMVmEis1iFX6gPqyePKKCfIXTOtNRT1t_9UQTscShL_7zRDxOaFVtNHkWLsMRfDJ4UpCaMDLD7wab6qPrWk8Tro/s320/picture164.jpg" /></span></a><span style="font-family:verdana;">
<br />
<br />To verify that the query did rewrite we can use dbms_mview.explain_rewrite, and the table rewrite_table:
<br />
<br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMpZ0SgteWMoSETUxVEeKMn1id6SEGvnBNwDhqSXTvALYXxQlrgNdeCUWvxoQNcrfMbCSJ8UktiYjZVA8Egy1TBXqF-_AnGquQ1D0KqmJpPwt4riJAaQ5TFImUwX_rGP3Nkc5uAasYexQ/s1600-h/picture167.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 242px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5298584347413924642" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMpZ0SgteWMoSETUxVEeKMn1id6SEGvnBNwDhqSXTvALYXxQlrgNdeCUWvxoQNcrfMbCSJ8UktiYjZVA8Egy1TBXqF-_AnGquQ1D0KqmJpPwt4riJAaQ5TFImUwX_rGP3Nkc5uAasYexQ/s320/picture167.JPG" /></span></a><span style="font-family:verdana;">
<br />
<br />If we choose:
<br />
<br /></span></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGhoxnT2XUwyW-OECxaRChGMilhkuL1YG33oblsOpo64lTkiAUPJzbZ2UuhTnLwk7_3nngiO7eO0fhmHrjzLtVsy6gBpsc2A9XuO8xQCElTJfU5BRIJs5PfmLwY7eBBBK0Xqvxmdu_kWQ/s1600-h/picture157.jpg"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 46px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5295982657453211458" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGhoxnT2XUwyW-OECxaRChGMilhkuL1YG33oblsOpo64lTkiAUPJzbZ2UuhTnLwk7_3nngiO7eO0fhmHrjzLtVsy6gBpsc2A9XuO8xQCElTJfU5BRIJs5PfmLwY7eBBBK0Xqvxmdu_kWQ/s320/picture157.jpg" /></span></a><span style="font-family:verdana;">
<br />
<br />NQQuery.log:
<br />
<br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjm1_ES_YfWFLxG500fXG_d4BhO8YayicmTiBQ74kijnd6Ad_lYeNPEpbZ-aRijTEiLGUPcrSjKo9esxtCPT_MAtT8i-rby5DSYlhCwBzIno8K2ODHBCikSjgjkv9Mm6mG8L6YF99LiasE/s1600-h/picture168.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 117px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5298588004002037346" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjm1_ES_YfWFLxG500fXG_d4BhO8YayicmTiBQ74kijnd6Ad_lYeNPEpbZ-aRijTEiLGUPcrSjKo9esxtCPT_MAtT8i-rby5DSYlhCwBzIno8K2ODHBCikSjgjkv9Mm6mG8L6YF99LiasE/s320/picture168.JPG" /></span></a><span style="font-family:verdana;">
<br />
<br />Explain plan, table plan_table:
<br />
<br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9UqCdhKvJ-QkbzuvxD1Qs4GLPz55SozWABfDqYom0GPM6Vnin9IQ8-1RKru4lPlZxPqvf3PId95F5sU1xanB-N1Mi_x-Qsez0SVyPHSJ8C1M_sHYh6Utwg3hOnGYf9VSJu2QKUrD1sHY/s1600-h/picture169.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 247px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5298589850846314226" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9UqCdhKvJ-QkbzuvxD1Qs4GLPz55SozWABfDqYom0GPM6Vnin9IQ8-1RKru4lPlZxPqvf3PId95F5sU1xanB-N1Mi_x-Qsez0SVyPHSJ8C1M_sHYh6Utwg3hOnGYf9VSJu2QKUrD1sHY/s320/picture169.JPG" /></span></a><span style="font-family:verdana;">
<br />
<br />If we choose:
<br />
<br /></span></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9dP88P1JFUz3aEUBrD2ijkAp_SAnW_Pqg6bL2LI7EzZj7AZlujP2o6NNv-E6cxXCatIkkyenUJRKJ5eAIWPcNxmOTierus_JiDz_Ez_2TKE2xYfL5gmBhV6eM50ah6zW_23hRw7N8PGw/s1600-h/picture155.jpg"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 34px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5295976917669984146" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9dP88P1JFUz3aEUBrD2ijkAp_SAnW_Pqg6bL2LI7EzZj7AZlujP2o6NNv-E6cxXCatIkkyenUJRKJ5eAIWPcNxmOTierus_JiDz_Ez_2TKE2xYfL5gmBhV6eM50ah6zW_23hRw7N8PGw/s320/picture155.jpg" /></span></a><span style="font-family:verdana;">
<br />
<br />NQQuery.log:
<br />
<br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiM5khDXA1o6p3v3uDnHBsHSbLBHXeAy1591sf5FZaCjLXac_tqlfS2M9MU5PA5XpU9DJTN0fbyraoQMN-7FT-WFmHnx68wHp9f35rx9xiyOUBhGNXvlgthf2S3_zKJYDhfaD0uQxoUUtk/s1600-h/picture170.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 141px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5298596893930161634" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiM5khDXA1o6p3v3uDnHBsHSbLBHXeAy1591sf5FZaCjLXac_tqlfS2M9MU5PA5XpU9DJTN0fbyraoQMN-7FT-WFmHnx68wHp9f35rx9xiyOUBhGNXvlgthf2S3_zKJYDhfaD0uQxoUUtk/s320/picture170.JPG" /></span></a><span style="font-family:verdana;">
<br />
<br />Explain plan, plan_table:
<br />
<br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglI5aXOCjbKY0KeGaeiDwszxZKrmPhpasfoTeIBVS-YyxarmtCOfOTjzVe5BH5c054JaSufiZx7aKo6HAUf-LA_jwhUKq0jUZoxnYfZMFTRw_fLqPGbi32zN1UfWVO1Y5QHqHwEOHNg5g/s1600-h/picture171.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 262px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5298598008028344322" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglI5aXOCjbKY0KeGaeiDwszxZKrmPhpasfoTeIBVS-YyxarmtCOfOTjzVe5BH5c054JaSufiZx7aKo6HAUf-LA_jwhUKq0jUZoxnYfZMFTRw_fLqPGbi32zN1UfWVO1Y5QHqHwEOHNg5g/s320/picture171.JPG" /></span></a><span style="font-family:verdana;">
<br />
<br />We see that in all three queries the query rewrite works correctly, query has been rewritten.
<br />
<br />I really try to show how this works when you are using OBIEE queries. If you have any question or suggestion please post the comment.
<br /></span><span style="font-family:verdana;"></span>Goran Ockohttp://www.blogger.com/profile/16571461599213456839noreply@blogger.com2tag:blogger.com,1999:blog-196729317318279460.post-53680117140176206672009-11-19T21:19:00.001+01:002009-11-19T21:26:43.330+01:00Variables in direct database requests<div><font face="verdana">In Answers we have possibility to write SQL directly to the database.<br /><br /></font><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZ5q3Ik48u-_vl9w8PrUj5WoumBXiEZXNbYIi9VoO_xPJyEvTDXARYUHk6__M6bJxUAoDpcp5eO2Ubhb5hUmpp3jokIAdaNoJ6_6T9vyfct7LXhHIZkYMtkbk_3gCdEODGi2lsnBEh7WB3/s1600-h/picture543.JPG"><font face="verdana"><img style="WIDTH: 320px; HEIGHT: 112px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5392462308877410002" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZ5q3Ik48u-_vl9w8PrUj5WoumBXiEZXNbYIi9VoO_xPJyEvTDXARYUHk6__M6bJxUAoDpcp5eO2Ubhb5hUmpp3jokIAdaNoJ6_6T9vyfct7LXhHIZkYMtkbk_3gCdEODGi2lsnBEh7WB3/s320/picture543.JPG" /></font></a><font face="verdana"><br /><br />I'll show how to use repository, session and presentation variables in direct database request and whether this is possible or not and compare this with normal Answers request.<br /><br />Repository initialization block:<br />select to_char(min(time_id), 'dd.mm.yyyy') from sales<br /><br />Repository variable (dynamic):<br />rv_test_date_to_char<br /><br />Session initialization block:<br />select 'Photo' from dual<br /><br />Non-system session variable:<br />CAT, enable any user to set the value checked, without default initializer<br /><br />Dashboard prompt fields:<br />PRODUCTS.PROD_CATEGORY, drop-down list, set request variable CAT<br />CHANNELS.CHANNEL_DESC, drop-down list, set presentation variable pv_channel_desc<br /><br />The first one re-sets session variable and the second one sets presentation variable.<br /><br />Normal Answers request columns and filter:<br />PRODUCTS.PROD_CATEGORY<br />VALUEOF(NQ_SESSION.CAT)<br />VALUEOF(rv_test_date_to_char)<br />'@{pv_channel_desc}'<br />PRODUCTS.PROD_CATEGORY is prompted<br /><br />Direct database request:<br /><br /></font><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOktksLu5dnmOqB08YQnXDobwfqa1Ip0P9iGRXB4vb6c6ROVQA9VDbSyVgjRCPvMn8PDJn2veldmvKd-zE5m0kO1wz63SxDIJM4MLYnheyCX1o3TngdkMZLBbv_PARq2F_-SmTbye_4b3d/s1600-h/picture546.JPG"><font face="verdana"><img style="WIDTH: 320px; HEIGHT: 213px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5392468530330986674" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOktksLu5dnmOqB08YQnXDobwfqa1Ip0P9iGRXB4vb6c6ROVQA9VDbSyVgjRCPvMn8PDJn2veldmvKd-zE5m0kO1wz63SxDIJM4MLYnheyCX1o3TngdkMZLBbv_PARq2F_-SmTbye_4b3d/s320/picture546.JPG" /></font></a><font face="verdana"><br /><br />SQL statement:<br /></font><font face="verdana"><font color="#ff0000">select<br />'VALUEOF(NQ_SESSION.CAT)' session_variable,<br />'VALUEOF(rv_test_date_to_char)' repository_variable,<br />'@{pv_channel_desc}{Internet}' presentation_variable,<br />channel_desc<br />from channels<br />where channel_desc='@{pv_channel_desc}{Internet}'</font><br /><br />We see inside the statement what is the syntax for referencing variables, for that I know that works correctly.<br /><br />Now if we put all three objects in the dashboard page at initial we get this:<br /><br /></font><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSt0ty0HNS7gDxUoJ_0vQEnL-mBF4GeHF33FnzX0mB7iTrk9TW9uQTkx-zNAEmNBbThIGR18jjro0Fq0B56gNu-d3GeAqJ0pkDXQlvAP_xJgVDmAQH3i_4pR5F73PDJDYeqYsFcNMizhtU/s1600-h/picture547.JPG"><font face="verdana"><img style="WIDTH: 320px; HEIGHT: 148px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5392471159639629602" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSt0ty0HNS7gDxUoJ_0vQEnL-mBF4GeHF33FnzX0mB7iTrk9TW9uQTkx-zNAEmNBbThIGR18jjro0Fq0B56gNu-d3GeAqJ0pkDXQlvAP_xJgVDmAQH3i_4pR5F73PDJDYeqYsFcNMizhtU/s320/picture547.JPG" /></font></a><font face="verdana"><br /><br />We change values from the prompt and re-set session and presentation variable:<br /><br /></font><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlZA5kgz1D5I9xNO40lv5tIFSXTkvI43V-7lsFp-AJ-jd05JsO4X3uBdw-TB8h3IirAfNTznoIghdHlxTlRc3qRQf0J8nxTvzjeim_obqoGcaiBqqY-spT4eZtiGKyHpjtP4KPT1DfFAO0/s1600-h/picture548.JPG"><font face="verdana"><img style="WIDTH: 320px; HEIGHT: 117px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5392473045488921730" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlZA5kgz1D5I9xNO40lv5tIFSXTkvI43V-7lsFp-AJ-jd05JsO4X3uBdw-TB8h3IirAfNTznoIghdHlxTlRc3qRQf0J8nxTvzjeim_obqoGcaiBqqY-spT4eZtiGKyHpjtP4KPT1DfFAO0/s320/picture548.JPG" /></font></a><font face="verdana"><br /><br />Everything works fine in the direct database request except we cannot view new value of non-system session variable no mather how many times we refresh (re-set) it, it only takes value that we defined in the initialization block code. New (refreshed) value affects only Answers request. </font></div>Goran Ockohttp://www.blogger.com/profile/16571461599213456839noreply@blogger.com3tag:blogger.com,1999:blog-196729317318279460.post-43782770513214793442009-11-08T19:13:00.006+01:002009-11-08T21:04:23.155+01:00Denormalized HR employees table, dimension hierarchy and level drills in OBIEE<span style="font-family:verdana;">I looked at the table of employees which is placed on standard Oracle HR schema and I thought that it would be great to see it in the denormalized shape in which every row contains data about parent levels.<br /><br />Table employees has a self referential join (employee_id - manager_id) which describes us relation. Each employee have its parent employee (manager) except employee_id 100 which is president and placed on the top of hierarchy.<br /><br />Employee hierarchy is unbalanced, and balanced hierarchy means that each branch has the same number of levels (for example products dimension table, sh.products). We'll denormalize employee table (dimension) to get user friendly hierarchy. After we make denormalized structure we'll build dimension with levels in obiee and use the second copy of employees table as a fact table to find out what is the sum of the salary of all employees first level down for the current level of employee/manager.<br /><br />First we want to find out what is a maximum level depth in employees table:<br /><br /><span style="font-size:85%;">select<br />max(LEVEL)<br />from employees<br />start with email='SKING'<br />connect by prior employee_id=manager_id<br /></span><br />The maximum level depth is 4. Four levels we'll have in the denormalized shape. We use email column instead of first name and last name to identify each employee and this would be a primary key in each level.<br /><br />Number of employees on each level:<br /><br /><span style="font-size:85%;">select<br />count(email),<br />LEVEL<br />from employees<br />start with email='SKING'<br />connect by prior employee_id=manager_id<br />group by LEVEL<br />order by 2</span><br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhuDzngA8CKCWK0WM9S8-67CfNmHV97ilqdkrsOmVXrPNS67alzRLkPl_b-Q3WUPDQWi0v6_vOkxxywu5PkrbsItk0l6gPcZ3Xd2JvTUL0z1qriEUbcjtDT3b1oYWhPa0-fLpxSGvsLYAF/s1600-h/picture600.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 180px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5399958457082155714" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhuDzngA8CKCWK0WM9S8-67CfNmHV97ilqdkrsOmVXrPNS67alzRLkPl_b-Q3WUPDQWi0v6_vOkxxywu5PkrbsItk0l6gPcZ3Xd2JvTUL0z1qriEUbcjtDT3b1oYWhPa0-fLpxSGvsLYAF/s320/picture600.JPG" /></span></a><span style="font-family:verdana;"><br /><br />This is employee data in the basic form:<br /><br /><span style="font-size:85%;">select LEVEL,<br /></span><span style="font-size:85%;">employee_id,<br />email,<br />job_id,<br />manager_id<br />from employees<br />start with email='SKING'<br />connect by prior employee_id=manager_id<br />order by 1,2</span><br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcToCwzz4iXPrDKbuiYyZEE-e-tgzpnUjoV6NrLWBgBM-DbpsTs-suiFOt4vGji6zuGX3UiatGmtBDkZMHoOY_25Bvnzb7cD7QdBJQOYreEJg9pQFxuVyZ6IoDrEBH9wYC3FkNGmFculQ6/s1600-h/picture601.JPG"><span style="font-family:verdana;"><img style="WIDTH: 261px; HEIGHT: 320px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5399963103340008386" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcToCwzz4iXPrDKbuiYyZEE-e-tgzpnUjoV6NrLWBgBM-DbpsTs-suiFOt4vGji6zuGX3UiatGmtBDkZMHoOY_25Bvnzb7cD7QdBJQOYreEJg9pQFxuVyZ6IoDrEBH9wYC3FkNGmFculQ6/s320/picture601.JPG" /></span></a><span style="font-family:verdana;"><br /><br />In this example we don't have loops in the data, value below the parent cannot be his parent, so we don't need NOCYCLE parameter in the CONNECT BY condition.<br /><br />So, employees are placed on each level. If you look at level 3 for example there are lots of employees whose job_id is ST_CLERK and they managers are at level 2 having ST_MAN as job_id. The similar is with level 4, IT_PROG, FI_ACCOUNT and AC_ACCOUNT having managers with job_id IT_PROG, FI_MGR and AC_MGR. Some employees ends at level 2, for example I add new employee which job_id is PRES_ASST (add this job_id into table jobs with president personal assistant as job title), and he doesn't have levels below him.<br /><br />The first step is going into obiee Administrator physical level and make new physical table as select table type:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8cdcYnlkbtsTukoIuwpEFzVkRzY_jHzY5DojBfxRTrMVrZukEFwQiQc5BuxuPMwX6vtv8F-2cyo3pGylj3GmLbhTpghgovmIIF3C58XXBPSGunrcHg63Jvd1zY2XIYtDug3d6_E9PoDFj/s1600-h/picture602.JPG"><span style="font-family:verdana;"><img style="WIDTH: 267px; HEIGHT: 320px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5401321057928078850" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8cdcYnlkbtsTukoIuwpEFzVkRzY_jHzY5DojBfxRTrMVrZukEFwQiQc5BuxuPMwX6vtv8F-2cyo3pGylj3GmLbhTpghgovmIIF3C58XXBPSGunrcHg63Jvd1zY2XIYtDug3d6_E9PoDFj/s320/picture602.JPG" /></span></a><span style="font-family:verdana;"><br /><br />I use this code for employee table levels denormalization:<br /><br /><span style="font-size:85%;">select<br />employee_id,<br />employee_level,<br />value_below,<br />nvl(level4_id, nvl(level3_id, nvl(level2_id, level1_id))) level4_id,<br />nvl(level4_desc, nvl(level3_desc, nvl(level2_desc,level1_desc))) level4_desc,<br />nvl(level3_id, nvl(level2_id, level1_id)) level3_id,<br />nvl(level3_desc, nvl(level2_desc,level1_desc)) level3_desc,<br />nvl(level2_id, level1_id) level2_id,<br />nvl(level2_desc,level1_desc) level2_desc,<br />level1_id,<br />level1_desc,<br />salary,<br />department_id,<br />manager_id<br />from<br />(<br />select<br />LEVEL,<br />concat('LEVEL ', cast(LEVEL as varchar2(1))) as employee_level,<br />case when CONNECT_BY_ISLEAF =1 then 'No' else 'Yes' end as value_below,<br />employee_id,<br />manager_id,<br />email,<br />salary,<br />department_id,<br />decode(LEVEL,1,to_char(employee_id),substr<br />(<br />SYS_CONNECT_BY_PATH(employee_id, '/'),<br />instr(SYS_CONNECT_BY_PATH(employee_id, '/'),'/',1,1)+1,<br />instr(SYS_CONNECT_BY_PATH(employee_id, '/'),'/',1,2)-instr(SYS_CONNECT_BY_PATH(employee_id, '/'),'/',1,1)-1<br />)<br />) level1_id,<br />decode(LEVEL,1,to_char(email),substr<br />(<br />SYS_CONNECT_BY_PATH(email, '/'),<br />instr(SYS_CONNECT_BY_PATH(email, '/'),'/',1,1)+1,<br />instr(SYS_CONNECT_BY_PATH(email, '/'),'/',1,2)-instr(SYS_CONNECT_BY_PATH(email, '/'),'/',1,1)-1<br />)<br />) level1_desc,<br />--Level2<br />decode(LEVEL,2,to_char(employee_id),substr<br />(<br />SYS_CONNECT_BY_PATH(employee_id, '/'),<br />instr(SYS_CONNECT_BY_PATH(employee_id, '/'),'/',1,2)+1,<br />instr(SYS_CONNECT_BY_PATH(employee_id, '/'),'/',1,3)-instr(SYS_CONNECT_BY_PATH(employee_id, '/'),'/',1,2)-1<br />)<br />) level2_id,<br />decode(LEVEL,2,to_char(email),substr<br />(<br />SYS_CONNECT_BY_PATH(email, '/'),<br />instr(SYS_CONNECT_BY_PATH(email, '/'),'/',1,2)+1,<br />instr(SYS_CONNECT_BY_PATH(email, '/'),'/',1,3)-instr(SYS_CONNECT_BY_PATH(email, '/'),'/',1,2)-1<br />)<br />) level2_desc,<br />--Level 3<br />decode(LEVEL,3,to_char(employee_id),substr<br />(<br />SYS_CONNECT_BY_PATH(employee_id, '/'),<br />instr(SYS_CONNECT_BY_PATH(employee_id, '/'),'/',1,3)+1,<br />instr(SYS_CONNECT_BY_PATH(employee_id, '/'),'/',1,4)-instr(SYS_CONNECT_BY_PATH(employee_id, '/'),'/',1,3)-1<br />)<br />) level3_id,<br />decode(LEVEL,3,to_char(email),substr<br />(<br />SYS_CONNECT_BY_PATH(email, '/'),<br />instr(SYS_CONNECT_BY_PATH(email, '/'),'/',1,3)+1,<br />instr(SYS_CONNECT_BY_PATH(email, '/'),'/',1,4)-instr(SYS_CONNECT_BY_PATH(email, '/'),'/',1,3)-1<br />)<br />) level3_desc,<br />--Level 4<br />decode(LEVEL,4,to_char(employee_id),substr<br />(<br />SYS_CONNECT_BY_PATH(employee_id, '/'),<br />instr(SYS_CONNECT_BY_PATH(employee_id, '/'),'/',1,4)+1,<br />instr(SYS_CONNECT_BY_PATH(employee_id, '/'),'/',1,5)-instr(SYS_CONNECT_BY_PATH(employee_id, '/'),'/',1,4)-1<br />)<br />) level4_id,<br />decode(LEVEL,4,to_char(email),substr<br />(<br />SYS_CONNECT_BY_PATH(email, '/'),<br />instr(SYS_CONNECT_BY_PATH(email, '/'),'/',1,4)+1,<br />instr(SYS_CONNECT_BY_PATH(email, '/'),'/',1,5)-instr(SYS_CONNECT_BY_PATH(email, '/'),'/',1,4)-1<br />)<br />) level4_desc,<br />SYS_CONNECT_BY_PATH(email, '/') "desc_all",<br />SYS_CONNECT_BY_PATH(employee_id, '/') "id_all",<br />SYS_CONNECT_BY_PATH(job_id, '/') "job_all"<br />from employees<br />start with employee_id=100<br />connect by prior employee_id=manager_id<br />order by employee_id<br />)</span><br /><br />For employees that are identified at the high levels I'll propagate current level id and description to lowest levels and for that I used:<br /><br /><span style="font-size:85%;">nvl(level4_id, nvl(level3_id, nvl(level2_id, level1_id))) level4_id,<br />nvl(level4_desc, nvl(level3_desc, nvl(level2_desc,level1_desc))) level4_desc,<br />nvl(level3_id, nvl(level2_id, level1_id)) level3_id,<br />nvl(level3_desc, nvl(level2_desc,level1_desc)) level3_desc,<br />nvl(level2_id, level1_id) level2_id,<br />nvl(level2_desc,level1_desc) level2_desc</span><br /><br />This is not mandatory.<br /><br />For example SKING is identified only at level 1 and the same value is propagated till the level 4.<br /><br />Before examples, one thing is left to do. In the physical layer make alias of Employee Hierarchy View that we build and name it as Employee Hierarchy Normal. We'll use this as complete employees denormalization data view. Make another alias for employees table, we'll use it as a fact table to get summ of the first level down for the current employee.<br /><br />So our physical diagram looks like this:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_MhTcuPgd0CT7SGzimbM8Dml4weKiIrjP9zimfH6EpCbN9_hGsCYiWaPRvmkppjqUwp_hABNPEqRSA7NhJs9uIHgV-ufE1C7fTmyPmS-DoHx5wXT-nrDSz4XZmp63KZ1MbS3I-64_tFSo/s1600-h/picture603.JPG"><span style="font-family:verdana;"><img style="WIDTH: 241px; HEIGHT: 289px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5401335841625978850" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_MhTcuPgd0CT7SGzimbM8Dml4weKiIrjP9zimfH6EpCbN9_hGsCYiWaPRvmkppjqUwp_hABNPEqRSA7NhJs9uIHgV-ufE1C7fTmyPmS-DoHx5wXT-nrDSz4XZmp63KZ1MbS3I-64_tFSo/s320/picture603.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Foreign keys:<br /><br />"Employee Hierarchy View".employee_id = "Employee Fact Sum First Level Down".MANAGER_ID<br />"Employee Hierarchy View Normal".employee_id = "Employee Fact Sum First Level Down".MANAGER_ID<br /><br />In the BMM we make left join from Employee Hierarchy Drills to Employee Fact to return all record even if there is no sum salary of employees first level down for the current employee (manager):<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizJzh5QB2H6QvEDepMQ4z5iNCmKpJXvBIHgJ-guFvLXZ094WgOAgo1NHBaEXiRL4t6EBgTW6wcMcrppaFo5dYcCePX7P7fGeaZJoUlEqMZKWa1qEtjty-yCdS7mRcsvIMicHUvR0_VsxZd/s1600-h/picture635.JPG"><span style="font-family:verdana;"><img style="WIDTH: 400px; HEIGHT: 243px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5401742979525295010" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizJzh5QB2H6QvEDepMQ4z5iNCmKpJXvBIHgJ-guFvLXZ094WgOAgo1NHBaEXiRL4t6EBgTW6wcMcrppaFo5dYcCePX7P7fGeaZJoUlEqMZKWa1qEtjty-yCdS7mRcsvIMicHUvR0_VsxZd/s400/picture635.JPG" /></span></a><span style="font-family:verdana;"><br /><br /><strong>Example - employees dimension hierarchy and level drills using multiple logical table sources</strong><br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIu1zNYhLuRgJm6f3gnnL3qNuWJ3iEQsWpmQG4Z18n_Q5fGYxOwP6yjm7doMMI1f1TBR63x4bYo_7hrs1oKKWMq-7cu8mSF362WZCatm357UUh23wqWewaSHiUzOU-89YtMuO5IqvYslJJ/s1600-h/picture604.JPG"><span style="font-family:verdana;"><img style="WIDTH: 165px; HEIGHT: 320px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5401339465168625106" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIu1zNYhLuRgJm6f3gnnL3qNuWJ3iEQsWpmQG4Z18n_Q5fGYxOwP6yjm7doMMI1f1TBR63x4bYo_7hrs1oKKWMq-7cu8mSF362WZCatm357UUh23wqWewaSHiUzOU-89YtMuO5IqvYslJJ/s320/picture604.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Logical table sources in order:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqF3SewmfKicgawNtB7-b4iIHCxO0PFjuiqgKoNNhRbJSOGSn-jFHPNstxTSV8_FDPJgE3MaMy_P27EbM34EPSebaBQd49KJC_09L-w30HFJ3MlBH8NCK7Yhoj98uM4freDLNbqqedF90h/s1600-h/picture605.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 168px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5401342195332660146" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqF3SewmfKicgawNtB7-b4iIHCxO0PFjuiqgKoNNhRbJSOGSn-jFHPNstxTSV8_FDPJgE3MaMy_P27EbM34EPSebaBQd49KJC_09L-w30HFJ3MlBH8NCK7Yhoj98uM4freDLNbqqedF90h/s320/picture605.JPG" /></span></a><span style="font-family:verdana;"><br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVjDCmCdV2Ey3IvDRLZN342DwPMuIjYS9usAm9YZ5tm4JdzKkC2A4sD3iI79EfP3rlAxGVDiReVe-amTzzpXZgpw_yRE4bQ36Q1V-MJc5EEMgTSZ_zTIb0xHS9CCyVJFPCBrxCkxHgLn4l/s1600-h/picture606.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 316px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5401342327379547058" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVjDCmCdV2Ey3IvDRLZN342DwPMuIjYS9usAm9YZ5tm4JdzKkC2A4sD3iI79EfP3rlAxGVDiReVe-amTzzpXZgpw_yRE4bQ36Q1V-MJc5EEMgTSZ_zTIb0xHS9CCyVJFPCBrxCkxHgLn4l/s320/picture606.JPG" /></span></a><span style="font-family:verdana;"><br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsfFs_KEjCGvZIqY_xsxw9pLFvtrpGZeZIOfFtAR7ipR8neDGb6TvmUFtyMnTL4MMwn8uOq_crLeo4jtEsQele7JWRbBL4q8fWxukqmrY6gft-GqJ6CvSwYTe1yTpmkh7c9sKVVod1Wy7r/s1600-h/picture607.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 164px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5401342506044768034" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsfFs_KEjCGvZIqY_xsxw9pLFvtrpGZeZIOfFtAR7ipR8neDGb6TvmUFtyMnTL4MMwn8uOq_crLeo4jtEsQele7JWRbBL4q8fWxukqmrY6gft-GqJ6CvSwYTe1yTpmkh7c9sKVVod1Wy7r/s320/picture607.JPG" /></span></a><span style="font-family:verdana;"><br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZ1nvg0BKAjShWBpSZrHLX7KYZ9pAv9fVC7ljaoEdt8um6QZ4kfZRmN1axwTnZ7o6kJnftGQNl2ZLfDibIqtBt5DkhdTqK5nnWACE9chAgqS5fFrSASH1VIZixMeFRW9VYDLxM4scZSds_/s1600-h/picture608.JPG"><span style="font-family:verdana;"><img style="WIDTH: 286px; HEIGHT: 320px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5401342622736808626" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZ1nvg0BKAjShWBpSZrHLX7KYZ9pAv9fVC7ljaoEdt8um6QZ4kfZRmN1axwTnZ7o6kJnftGQNl2ZLfDibIqtBt5DkhdTqK5nnWACE9chAgqS5fFrSASH1VIZixMeFRW9VYDLxM4scZSds_/s320/picture608.JPG" /></span></a><span style="font-family:verdana;"><br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgX_aPRvNIoKGwOo8Zu_2mhCvN7F3or3nl-MOqW_l5Iw7bdvPXnjs6HBae_98GxYZ6Sb0eNRTu_WYO0RpAD9vuAR44wEOy98UokIpvw5mYvWq_dZIBVBPLNZxrpi73De3T8sWvG-DLjnrED/s1600-h/picture609.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 170px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5401342715395664322" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgX_aPRvNIoKGwOo8Zu_2mhCvN7F3or3nl-MOqW_l5Iw7bdvPXnjs6HBae_98GxYZ6Sb0eNRTu_WYO0RpAD9vuAR44wEOy98UokIpvw5mYvWq_dZIBVBPLNZxrpi73De3T8sWvG-DLjnrED/s320/picture609.JPG" /></span></a><span style="font-family:verdana;"><br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnFhkRbpi-PIHMCzfyxPgyHfZmG8s_v9JgLG83xAblA6F-5_Pr-ZP6L2JTbL9W62SSQtFwJOLry_DPiQOXgRyopDlD8C-mw-5wQKVkUkjSRKyh4JYqH3rGglMuKvTNhdNqj5ELvdSGb_M3/s1600-h/picture610.JPG"><span style="font-family:verdana;"><img style="WIDTH: 274px; HEIGHT: 320px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5401342815655530466" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnFhkRbpi-PIHMCzfyxPgyHfZmG8s_v9JgLG83xAblA6F-5_Pr-ZP6L2JTbL9W62SSQtFwJOLry_DPiQOXgRyopDlD8C-mw-5wQKVkUkjSRKyh4JYqH3rGglMuKvTNhdNqj5ELvdSGb_M3/s320/picture610.JPG" /></span></a><span style="font-family:verdana;"><br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGFXWC7_uEtriUsDbt6MhQegsM3AmKfNm0qMOpssBEaRTDfVPpPEg2rs4wuJ_ZBMBPpMZjfJ2zL0ZLvbUpuPMHdF1jKWEE3TwOt_UEEkxr5DPFB4pTZcGVufK-Rco1SiOPydmsJK1crsGu/s1600-h/picture611.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 169px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5401343112104605810" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGFXWC7_uEtriUsDbt6MhQegsM3AmKfNm0qMOpssBEaRTDfVPpPEg2rs4wuJ_ZBMBPpMZjfJ2zL0ZLvbUpuPMHdF1jKWEE3TwOt_UEEkxr5DPFB4pTZcGVufK-Rco1SiOPydmsJK1crsGu/s320/picture611.JPG" /></span></a><span style="font-family:verdana;"><br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuQdiN7YyMUsHqC9-3oC-C9JW6BK1srAKqJkF_l0bZlJBJ1M3JmV0OuB08Ti6x3LBRGvyPZdaBHMOl-ChvSlseH_zfkvUQ9lDCarnyN6WZ57dE3LvsP7AjNM01QhUchHmoLtT0KVSCcxn3/s1600-h/picture612.JPG"><span style="font-family:verdana;"><img style="WIDTH: 283px; HEIGHT: 320px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5401342983992172786" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuQdiN7YyMUsHqC9-3oC-C9JW6BK1srAKqJkF_l0bZlJBJ1M3JmV0OuB08Ti6x3LBRGvyPZdaBHMOl-ChvSlseH_zfkvUQ9lDCarnyN6WZ57dE3LvsP7AjNM01QhUchHmoLtT0KVSCcxn3/s320/picture612.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Little explanation why we put in the filter of each logical table source current level, for example if we are on the high level (SKING) and want to drill down to second level this query will be generated:<br /><br /><span style="font-size:85%;">select<br />distinct<br />level1_desc,<br />level2_desc<br />from Employee Hierarchy View<br />where level1_desc='SKING'</span><br /><br />You will get 16 rows, including the row that has level1_desc='SKING' and level2_desc='SKING' which is actually data placed on the first level (values propagated to lowest level). So with the logical table source filter we are excluding these rows.<br /><br /><strong>Employee hierarchy and drills test in Answers</strong><br /><br />Report structure:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhuU1F4c6iYPvz1pHzZrdLWI3VWj6qD2tC6bh2JTaiUB2a07O-10yx1ci87nl_tzK-TupFNiDqIzZ6gDsohEEqQtQZTl686t3TPVyUK98Hh4lj8A3BO7wxLv8MvHPTYhKuvZAakIKTMj94/s1600-h/picture613.JPG"><span style="font-family:verdana;"><img style="WIDTH: 400px; HEIGHT: 30px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5401363876015717778" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhuU1F4c6iYPvz1pHzZrdLWI3VWj6qD2tC6bh2JTaiUB2a07O-10yx1ci87nl_tzK-TupFNiDqIzZ6gDsohEEqQtQZTl686t3TPVyUK98Hh4lj8A3BO7wxLv8MvHPTYhKuvZAakIKTMj94/s400/picture613.JPG" /></span></a><span style="font-family:verdana;"><br /><br />First level:<br /><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIfn4rWFdA6pJ0l_Drwa68yv9kIyB5di0oErldZi2brBHVS7slFFWmABx6qoQlsqSPKAR5eRC10bw-JHMO_pe3H2tnJvHKZuQEuhiUyd-yKC0Wv1hn3vKJf0v_Shl4clxpefkBrs9ZZWqP/s1600-h/picture614.JPG"><img style="WIDTH: 400px; HEIGHT: 22px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5401764201455178274" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIfn4rWFdA6pJ0l_Drwa68yv9kIyB5di0oErldZi2brBHVS7slFFWmABx6qoQlsqSPKAR5eRC10bw-JHMO_pe3H2tnJvHKZuQEuhiUyd-yKC0Wv1hn3vKJf0v_Shl4clxpefkBrs9ZZWqP/s400/picture614.JPG" /></a><br /><br />Value below column tell us if this level has level below it. Notice measure sum salary first level down and salary current employee dimension attribute.<br /><br />Drill to the second level:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcVVxj2YA0LTTpZDGJvGMvoV8tMBmvqPyVADNeXuERNrmmB_bzYNdLJa51NpGU7V4zwPHPBCbChil-_2rJzS6ZEaP8AthYqADRwxyr1LZyTelyZXyJy5k5MJT3WHPp5Po1XpGlDOOpMLgR/s1600-h/picture615.JPG"><span style="font-family:verdana;"><img style="WIDTH: 400px; HEIGHT: 150px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5401365627659485490" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcVVxj2YA0LTTpZDGJvGMvoV8tMBmvqPyVADNeXuERNrmmB_bzYNdLJa51NpGU7V4zwPHPBCbChil-_2rJzS6ZEaP8AthYqADRwxyr1LZyTelyZXyJy5k5MJT3WHPp5Po1XpGlDOOpMLgR/s400/picture615.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Now if you try to drill from the TTEST which doesn't have level below him you would get:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpU84eE_zwewJ2wYeKQDQTUKM6ASD1g3m_3dCRreU3WjP9P56r8sj3rGMnEojcfyKFufk3o5Zkua2P7HdxQIVvbmpIBO6ykGF7iR7nzOc6JXy3-z5eA7so6TRDw3H1hjnoDZRgYTV-Tf4j/s1600-h/picture616.JPG"><span style="font-family:verdana;"><img style="WIDTH: 226px; HEIGHT: 143px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5401366628108455218" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpU84eE_zwewJ2wYeKQDQTUKM6ASD1g3m_3dCRreU3WjP9P56r8sj3rGMnEojcfyKFufk3o5Zkua2P7HdxQIVvbmpIBO6ykGF7iR7nzOc6JXy3-z5eA7so6TRDw3H1hjnoDZRgYTV-Tf4j/s400/picture616.JPG" /></span></a><span style="font-family:verdana;"><br /><br />This is because when crossing from the second to the third logical table source it trying to execute where condition:<br /><br /><span style="font-size:85%;">select<br />distinct<br />level1_desc,<br />level2_desc,<br />level3_desc<br />from Employee Hierarchy View<br />where level1_desc='SKING'<br />and level2_desc='TTEST'<br />and employee_level='LEVEL 3'</span><br /><br />There is no level 3 for TTEST.<br /><br />Drill now to the third level for any value that has level down:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3OvL7u8Cf4WWIRm2yMK5AOvM3FHXBVo1lO0YAZCHiaQf5ypfyMTT9bFR9ylOfuvHGNqKp1e17F7Zfn-Reo3rJmVqilQPQ86rd4JE0ZnpXWp3FuDspiRUmFIoACdt6YgRQnKW-AtLt4BSR/s1600-h/picture617.JPG"><span style="font-family:verdana;"><img style="WIDTH: 400px; HEIGHT: 65px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5401373632372838114" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3OvL7u8Cf4WWIRm2yMK5AOvM3FHXBVo1lO0YAZCHiaQf5ypfyMTT9bFR9ylOfuvHGNqKp1e17F7Zfn-Reo3rJmVqilQPQ86rd4JE0ZnpXWp3FuDspiRUmFIoACdt6YgRQnKW-AtLt4BSR/s400/picture617.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Not bad, NGREENBE has a salary 12000 and all employees which he's a manager have sum of the salary 39600. Chech this when drilling from him to lowest level, the last fourth level:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiItTPHXyBAvTODOK-UecamMUaiQxKEctI9btJFVcpmHwp34Uj9WPuphd42topIu7Tba7oFBA7zbeQVqx_O_yhorO8kc__ECa0q31T1y5e_71UWkOjZwCDJlsy65IS6WxGbhjRqGkTBJBtI/s1600-h/picture618.JPG"><span style="font-family:verdana;"><img style="WIDTH: 400px; HEIGHT: 73px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5401375117579886738" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiItTPHXyBAvTODOK-UecamMUaiQxKEctI9btJFVcpmHwp34Uj9WPuphd42topIu7Tba7oFBA7zbeQVqx_O_yhorO8kc__ECa0q31T1y5e_71UWkOjZwCDJlsy65IS6WxGbhjRqGkTBJBtI/s400/picture618.JPG" /></span></a><span style="font-family:verdana;"><br /><br />The sum works fine.<br /><br />What if we want to show in the report all employees with denormalized structure and the fact measure without starting from the higher level and without using drills?<br /><br />Lets try that:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGi0UnCY86LqU4sJToFPzXuVLI7Yh_EEaEspqFqWNq2fQ87TXcOI8eK5e8b3Ele9Uluum3XrjuSra_8MXO9iuPOkM1Ld25p0E_DyBZ5h0-Y7Ch_4WjxbWABZVqshR1DxvDzahsM6OaCN3F/s1600-h/picture619.JPG"><span style="font-family:verdana;"><img style="WIDTH: 400px; HEIGHT: 27px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5401380024769088770" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGi0UnCY86LqU4sJToFPzXuVLI7Yh_EEaEspqFqWNq2fQ87TXcOI8eK5e8b3Ele9Uluum3XrjuSra_8MXO9iuPOkM1Ld25p0E_DyBZ5h0-Y7Ch_4WjxbWABZVqshR1DxvDzahsM6OaCN3F/s400/picture619.JPG" /></span></a><span style="font-family:verdana;"><br /><br />The result is not good because the query goes to the last logical table source which contains all columns on the level 4 and the employee_level='LEVEL 4' filter is applied:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYB-XpjqJg5hFJxyt_oO4nwXVWnsqwVYhtcuRdB1YiNU24D_D19e_FbhZq7XjA7x2TtlX2sj1Yz17GPnzsqPajtvK6J-hCVZEaZTNARN3_FESiubSs2Cu0MvvW3UTUk5seVHlX0n0ou3WM/s1600-h/picture620.JPG"><span style="font-family:verdana;"><img style="WIDTH: 400px; HEIGHT: 135px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5401381015689528466" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYB-XpjqJg5hFJxyt_oO4nwXVWnsqwVYhtcuRdB1YiNU24D_D19e_FbhZq7XjA7x2TtlX2sj1Yz17GPnzsqPajtvK6J-hCVZEaZTNARN3_FESiubSs2Cu0MvvW3UTUk5seVHlX0n0ou3WM/s400/picture620.JPG" /></span></a><span style="font-family:verdana;"><br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqyFAB-vYfBS30N8qWhEre49ZeBPkiu69Mdr5SX6HkYiDRDBZBfIW2nYjr5P9mR6CiWtTDLpwlFWWtTvjwoZaDdkEzfQUaT9e2Mbh4teZqneuwTAJ_nWRnQ2zFUCdmXeceAICryhcV3VOL/s1600-h/picture621.JPG"><span style="font-family:verdana;"><img style="WIDTH: 400px; HEIGHT: 165px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5401381505773725698" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqyFAB-vYfBS30N8qWhEre49ZeBPkiu69Mdr5SX6HkYiDRDBZBfIW2nYjr5P9mR6CiWtTDLpwlFWWtTvjwoZaDdkEzfQUaT9e2Mbh4teZqneuwTAJ_nWRnQ2zFUCdmXeceAICryhcV3VOL/s400/picture621.JPG" /></span></a><span style="font-family:verdana;"><br /><br />So we must think something else in order to see all employees.<br /><br /><strong>Options to show detailed (complete) view of all employees</strong><br /><br /><strong>1. Change the filter of the last logical table source dynamic with non-system session variable and re-set it from the dashboard prompt</strong><br /><br />We'll make two reports, one starts with highest level and used for drill down, other is detailed with all levels shown in the report but without using drills.<br /><br />Create initialization block and non-system session variable:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEwmFleyYr6-cSn0WOHuBPnXkoCyGlQDEW75E1SN-MRvqzZV8SOrQ763uwjyOOQ0nNHMTKqocpwtTR0tyx7h5NXYCK-kyKJw3W_yreA0wEUWvokPs-3u25u6tNiFIgjqyx3z1AXAMbg6wQ/s1600-h/picture623.JPG"><span style="font-family:verdana;"><img style="WIDTH: 400px; HEIGHT: 204px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5401385932314351890" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEwmFleyYr6-cSn0WOHuBPnXkoCyGlQDEW75E1SN-MRvqzZV8SOrQ763uwjyOOQ0nNHMTKqocpwtTR0tyx7h5NXYCK-kyKJw3W_yreA0wEUWvokPs-3u25u6tNiFIgjqyx3z1AXAMbg6wQ/s400/picture623.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Create dashboard prompt which shows only Complete and Dimension hardcoded values and set request (session) variable SV_EMPLOYEE_HIERARCHY. Create two sections, each has guided navigation report to show or hide it according to session variable value that user sets from the prompt. I'll not show how to implement that, just the result.<br /><br />In the logical table source for level 4 write:<br /><br />orcl."".HR."Employee Hierarchy View".employee_level=CASE WHEN VALUEOF(NQ_SESSION."SV_EMPLOYEE_HIERARCHY")='Dimension' THEN 'LEVEL 4' ELSE orcl."".HR."Employee Hierarchy View".employee_level END<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhsNrHJFjspChlIWTdegZFhW4z9b12sarygv59cCe3Kq4okfEZCkkNfmiOIDU6lNUWGDQjQCJrw5HBnzHsccK5xANmWp2wxGPs6bb9C_6MGKRMuy1_Vol6uPjdublI-yqigU7zKLnFdtEfb/s1600-h/picture624.JPG"><span style="font-family:verdana;"><img style="WIDTH: 400px; HEIGHT: 388px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5401387797312133954" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhsNrHJFjspChlIWTdegZFhW4z9b12sarygv59cCe3Kq4okfEZCkkNfmiOIDU6lNUWGDQjQCJrw5HBnzHsccK5xANmWp2wxGPs6bb9C_6MGKRMuy1_Vol6uPjdublI-yqigU7zKLnFdtEfb/s400/picture624.JPG" /></span></a><span style="font-family:verdana;"><br /><br /><strong>Test</strong><br /><br />Choose dimension view with drills enabled:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDI1DX2mmbKzEes73GqEglLVLzHt5rXD1rU7Ur-K94QxDWje44Vdv4Z5_2NI01Mt55KmZph628S_heay9hDXp9s-l8M6FGKwXcfHsmcKphfk0hRBejHJdB-VSO1IjZSvoPrhCD7kGMH04L/s1600-h/picture625.JPG"><span style="font-family:verdana;"><img style="WIDTH: 400px; HEIGHT: 82px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5401725272828179282" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDI1DX2mmbKzEes73GqEglLVLzHt5rXD1rU7Ur-K94QxDWje44Vdv4Z5_2NI01Mt55KmZph628S_heay9hDXp9s-l8M6FGKwXcfHsmcKphfk0hRBejHJdB-VSO1IjZSvoPrhCD7kGMH04L/s400/picture625.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Don't forget to enable Drill in place option in the section properties.<br /><br />Now you are able to drill down to the lowest level (level 4) like we have shown and described before, everything is the same.<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJa-DfcH4u44ROTdGzWIWGHU-sH2ZUABIHaGrJlNk0sAsLgF6N-3XbDBKw7PQw0oWzMGBeNdboMxIriufTNm3FNhWxOeK1iwg7kX94hjQ2b2BDgteV9tOIlIWC2Fa8uVW6f0KeobluPTUu/s1600-h/picture626.JPG"><span style="font-family:verdana;"><img style="WIDTH: 400px; HEIGHT: 74px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5401725934636500690" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJa-DfcH4u44ROTdGzWIWGHU-sH2ZUABIHaGrJlNk0sAsLgF6N-3XbDBKw7PQw0oWzMGBeNdboMxIriufTNm3FNhWxOeK1iwg7kX94hjQ2b2BDgteV9tOIlIWC2Fa8uVW6f0KeobluPTUu/s400/picture626.JPG" /></span></a><span style="font-family:verdana;"><br /><br />And if you drill to the level 4 it used valid code from the last logical table source:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAAo0ObqkR8fVZZVVNqvA8pAr0L7tlyuQr3WV8iajA8aDCECcoU7noh279LMknpS6FcfZDv_zsJvjJcvqjxukWxs_aLWTUAUuTKD77GTuqJmpKujKctQK28C0oz3hHGl3mZ5Ovi1b9R2y4/s1600-h/picture632.JPG"><span style="font-family:verdana;"><img style="WIDTH: 400px; HEIGHT: 129px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5401735535774965042" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAAo0ObqkR8fVZZVVNqvA8pAr0L7tlyuQr3WV8iajA8aDCECcoU7noh279LMknpS6FcfZDv_zsJvjJcvqjxukWxs_aLWTUAUuTKD77GTuqJmpKujKctQK28C0oz3hHGl3mZ5Ovi1b9R2y4/s400/picture632.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Now choose complete view with drills disabled.<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2xtGcBA4I_KTWJxxYwnk5cf4WbA3AsUGpVXu9AaTtC7EYxPugMch-EUUTDYDegKR_7UixM5Ca-uPW03EU_GDWDPL5OuemzM_kLY9-xeRdlelJBC5Zz_OSp-5_XV4iw32-6VDcQzwkhwJe/s1600-h/picture627.JPG"><span style="font-family:verdana;"><img style="WIDTH: 374px; HEIGHT: 81px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5401728881853602898" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2xtGcBA4I_KTWJxxYwnk5cf4WbA3AsUGpVXu9AaTtC7EYxPugMch-EUUTDYDegKR_7UixM5Ca-uPW03EU_GDWDPL5OuemzM_kLY9-xeRdlelJBC5Zz_OSp-5_XV4iw32-6VDcQzwkhwJe/s400/picture627.JPG" /></span></a><span style="font-family:verdana;"><br /><br />The result:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgh1w4S0Iz5j62u_S7C4PKuw8XBc6FFhCRu9X0g9hE_M4592no4Chyphenhyphen5Nvb1S9QCokaE2lfx5RINzs65ilFb8fI1JUN6U969PUqClULQZrQv0-Cj1-6tFzJQq3c4WsyjmpD5WgJ_iwRpHuay/s1600-h/picture628.JPG"><span style="font-family:verdana;"><img style="WIDTH: 400px; HEIGHT: 217px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5401730846362854754" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgh1w4S0Iz5j62u_S7C4PKuw8XBc6FFhCRu9X0g9hE_M4592no4Chyphenhyphen5Nvb1S9QCokaE2lfx5RINzs65ilFb8fI1JUN6U969PUqClULQZrQv0-Cj1-6tFzJQq3c4WsyjmpD5WgJ_iwRpHuay/s400/picture628.JPG" /></span></a><span style="font-family:verdana;"><br /><br />In complete view all employees are included:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDpxbXzCPAmgIl1dJjIlYvTxhpLu-a1_q9b6F-TSlNHtdhY94JLip_0UPDCrkaiITU7DvVT8ZQ49EdMxPb5CnaKb0sk3PxwdwFF4BO02wPZLAyJnbgJu3dDBw3BoZQMr_GPalnZWgM0pxp/s1600-h/picture629.JPG"><span style="font-family:verdana;"><img style="WIDTH: 400px; HEIGHT: 33px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5401731571122894466" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDpxbXzCPAmgIl1dJjIlYvTxhpLu-a1_q9b6F-TSlNHtdhY94JLip_0UPDCrkaiITU7DvVT8ZQ49EdMxPb5CnaKb0sk3PxwdwFF4BO02wPZLAyJnbgJu3dDBw3BoZQMr_GPalnZWgM0pxp/s400/picture629.JPG" /></span></a><span style="font-family:verdana;"><br /><br />NQQuery.log:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsC5oQ_ojeiBszz7kqp81CLxanX_ObkHCWLUpdAI14pd0MMDLS8PjYglWLTIOhMHqGkeBhTQGne6Xpa0v2-1vztesClfBClbQOLmwe0KynqfcucwAJKIxz6tEJJMT5ae4NMSA2p074J9ik/s1600-h/picture631.JPG"><span style="font-family:verdana;"><img style="WIDTH: 400px; HEIGHT: 201px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5401735672459076882" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsC5oQ_ojeiBszz7kqp81CLxanX_ObkHCWLUpdAI14pd0MMDLS8PjYglWLTIOhMHqGkeBhTQGne6Xpa0v2-1vztesClfBClbQOLmwe0KynqfcucwAJKIxz6tEJJMT5ae4NMSA2p074J9ik/s400/picture631.JPG" /></span></a><span style="font-family:verdana;"><br /><br /><strong>2. Make the separate employees logical table without dimension drills</strong><br /><br />Make new logical table using Employee Hierarchy View Normal alias from the physical layer that we made before:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8A567w3IODozMrpqHsZ17dhTHk4CFpS8Ks5HkxdNn3v75CrICWHHa9I77UNFiBJT5vuTtJijCUGPZnhPfBDEiVr9OP_2__ujs1mlD-A9nwc9Ty7UXXetEytjrkTjbpWi87tWNZtZ8dlfI/s1600-h/picture633.JPG"><span style="font-family:verdana;"><img style="WIDTH: 258px; HEIGHT: 319px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5401739695709731778" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8A567w3IODozMrpqHsZ17dhTHk4CFpS8Ks5HkxdNn3v75CrICWHHa9I77UNFiBJT5vuTtJijCUGPZnhPfBDEiVr9OP_2__ujs1mlD-A9nwc9Ty7UXXetEytjrkTjbpWi87tWNZtZ8dlfI/s400/picture633.JPG" /></span></a><span style="font-family:verdana;"><br /><br />In the BMM join this table to Employee fact logical table:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhv3Pp5f90roVpuQfW8a0hB_ursMlnR1e4oRkzFpugs5WPlLH7vEwuGzCo3R8TIThQbrZajTApuVRDPqKXUlL-weBPlZeUI0rtjOfATBCuCXSrNq4jvFg6PmHyndpkMJL5a-sxopvWXpaE5/s1600-h/picture634.JPG"><span style="font-family:verdana;"><img style="WIDTH: 199px; HEIGHT: 174px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5401740458916804610" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhv3Pp5f90roVpuQfW8a0hB_ursMlnR1e4oRkzFpugs5WPlLH7vEwuGzCo3R8TIThQbrZajTApuVRDPqKXUlL-weBPlZeUI0rtjOfATBCuCXSrNq4jvFg6PmHyndpkMJL5a-sxopvWXpaE5/s400/picture634.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Don't forget left join:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgv8c1zoYIUMJSrMTBk7LM9dEHqwG2jGDjxuyBD8eqqhxSebBbl59cB7XilYsfN5_v96mIO1H2nhAlk8NeDXzTSrUwYFgzd6_qRB-3OA0ynKAUo4hwItenDGiz6LO7zxKWhdxz5JCNm33tI/s1600-h/picture636.JPG"><span style="font-family:verdana;"><img style="WIDTH: 400px; HEIGHT: 245px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5401743084085416050" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgv8c1zoYIUMJSrMTBk7LM9dEHqwG2jGDjxuyBD8eqqhxSebBbl59cB7XilYsfN5_v96mIO1H2nhAlk8NeDXzTSrUwYFgzd6_qRB-3OA0ynKAUo4hwItenDGiz6LO7zxKWhdxz5JCNm33tI/s400/picture636.JPG" /></span></a><span style="font-family:verdana;"><br /><br />You can use this logical table for detailed (complete) view to show all employees and still use previous logical table with dimension and drills. In that case you don't need this filter in the Employee Hierarchy Drills logical table in the logical table source for level 4:<br /><br />orcl."".HR."Employee Hierarchy View".employee_level=CASE WHEN VALUEOF(NQ_SESSION."SV_EMPLOYEE_HIERARCHY")='Dimension' THEN 'LEVEL 4' ELSE orcl."".HR."Employee Hierarchy View".employee_level END<br /><br />Make detailed report using Employee Hierarchy Normal logical table.<br /><br /></span><span style="font-family:verdana;"></span>Goran Ockohttp://www.blogger.com/profile/16571461599213456839noreply@blogger.com3tag:blogger.com,1999:blog-196729317318279460.post-2768098996272790252009-10-23T10:08:00.001+02:002009-10-23T12:20:03.452+02:00How to choose null, not null or all values from drop down list<span style="font-family:verdana;"><strong>Example</strong>
<br />
<br />Prompt the user to select only null, not null or all values from drop down harcoded list and reference it to the column.
<br />
<br />Table for this example:
<br />
<br /><span style="color:#ff0000;">create table value_test (id number,col1 number, col2 varchar2(100))</span>
<br />
<br /></span></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNZNdt5zEUj6HKW_qbJC-Qlx4ezLfiJSLwERi0a840ybTY5WOfoz1m3jkmKVFA3A0PEz7729zINnvvPNQbehYQjz1rNqk5oDXsDeSDPWoldnNgcZu88n2WEmfexIUY69AIzkcabAO6sco/s1600-h/picture467.JPG"><span style="font-family:verdana;"><img style="WIDTH: 251px; HEIGHT: 217px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5373236018356372098" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNZNdt5zEUj6HKW_qbJC-Qlx4ezLfiJSLwERi0a840ybTY5WOfoz1m3jkmKVFA3A0PEz7729zINnvvPNQbehYQjz1rNqk5oDXsDeSDPWoldnNgcZu88n2WEmfexIUY69AIzkcabAO6sco/s320/picture467.JPG" /></span></a><span style="font-family:verdana;">
<br />
<br />After importing table to Administrator we join it to the dummy fact table in the BMM (not shown).
<br />
<br />Dashboard prompt with drop down harcoded list:
<br />
<br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2MZw3NkR0wyporZf7QagkyR2a0kg_Y8hVgeDRVv5SqIr3Z4O_0UYQ2FE5SAz4gb2GH0HJE76k5_TxSmLyp5hFo2DF1z5o76OSvL7RD4rlX4U_4QnXo8HFDsQ9c4VozLgS8e9i8qGsAws/s1600-h/picture468.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 42px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5373237274745586354" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2MZw3NkR0wyporZf7QagkyR2a0kg_Y8hVgeDRVv5SqIr3Z4O_0UYQ2FE5SAz4gb2GH0HJE76k5_TxSmLyp5hFo2DF1z5o76OSvL7RD4rlX4U_4QnXo8HFDsQ9c4VozLgS8e9i8qGsAws/s320/picture468.JPG" /></span></a><span style="font-family:verdana;">
<br />
<br />SQL Results:
<br />
<br /><span style="color:#ff0000;">SELECT case when VALUE_TEST.COL1 is not null then 'Not null' when VALUE_TEST.COL1 is null then 'Null' end FROM "Write back test" union all SELECT case when 1=2 then VALUE_TEST.COL2 else 'All' end FROM "Write back test"</span>
<br />
<br />Put All as default:
<br />
<br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnB8GnQhUdLAFVEp_3-Yxhfa_CP6yuvS79H21uEwwljwZnV7OuDjD2wuFJ-jrnM8Mxw0Veein81_HIERzzP03jw20GpQt-cxI8Y4wO5yO4y__dydAmcCdpkeKyif9LA-F2x8RFZAKvbku4/s1600-h/picture554.JPG"><img style="WIDTH: 156px; HEIGHT: 69px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5395091061695563826" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnB8GnQhUdLAFVEp_3-Yxhfa_CP6yuvS79H21uEwwljwZnV7OuDjD2wuFJ-jrnM8Mxw0Veein81_HIERzzP03jw20GpQt-cxI8Y4wO5yO4y__dydAmcCdpkeKyif9LA-F2x8RFZAKvbku4/s320/picture554.JPG" /></a>
<br />
<br />Answers report:
<br />
<br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwwV8M8dVFs4mOG58Lh4h55F-9qS1mbCh33OSO5lI6gnXCKp1BMpPixTbHm3J11aiwgi7xe5QwZMk3oVHYlm9Ks-zvwr224bGUzOus-an5A0mrwXoomnwF1YJbJbCMLTsOBtqGBpIHOgM/s1600-h/picture469.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 101px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5373238219188655218" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwwV8M8dVFs4mOG58Lh4h55F-9qS1mbCh33OSO5lI6gnXCKp1BMpPixTbHm3J11aiwgi7xe5QwZMk3oVHYlm9Ks-zvwr224bGUzOus-an5A0mrwXoomnwF1YJbJbCMLTsOBtqGBpIHOgM/s320/picture469.JPG" /></span></a><span style="font-family:verdana;">
<br />
<br />Advanced SQL filter:
<br />
<br /><span style="color:#ff0000;">case
<br />when '@{pv}'='All' then 'All'
<br />else
<br />case when VALUE_TEST.COL1 is not null then 'Not null' else 'Null' end
<br />end='@{pv}'</span>
<br />
<br /><strong>Test</strong>
<br />
<br />All (column col1 all values):
<br />
<br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbZdRs5Wq3U0ELhPSlL9y8x_E-7t30mJzOadlC5Y5FUVPxEgF0t2nhJau0Wvaedh2WXsPtWTKzgfbsQ8_dLh2jBchMySz751gR5HTWqIuq6LXy8pPxREnyLkzfjroR_-s-oS04muOQDog/s1600-h/picture470.JPG"><span style="font-family:verdana;"><img style="WIDTH: 240px; HEIGHT: 318px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5373241949309436194" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbZdRs5Wq3U0ELhPSlL9y8x_E-7t30mJzOadlC5Y5FUVPxEgF0t2nhJau0Wvaedh2WXsPtWTKzgfbsQ8_dLh2jBchMySz751gR5HTWqIuq6LXy8pPxREnyLkzfjroR_-s-oS04muOQDog/s320/picture470.JPG" /></span></a><span style="font-family:verdana;">
<br />
<br />NQQuery.log:
<br />
<br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXgMR3ZIN6DxSLGXAWsF0Vokw30elYwaJ256uuhaUN2hjtS5a06koDx4mgzAKDgJT93VKqxwttJqrjOuB0014RxsVj3P_SdhmWSG1zjrR8dTuQFX1GK5VgnAFtA26M3FyIHoPYG9-UHvO3/s1600-h/picture553.JPG"><img style="WIDTH: 320px; HEIGHT: 96px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5395090144209077842" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXgMR3ZIN6DxSLGXAWsF0Vokw30elYwaJ256uuhaUN2hjtS5a06koDx4mgzAKDgJT93VKqxwttJqrjOuB0014RxsVj3P_SdhmWSG1zjrR8dTuQFX1GK5VgnAFtA26M3FyIHoPYG9-UHvO3/s320/picture553.JPG" /></a>
<br />
<br />Not null (column col1 is not null):
<br />
<br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiojPdg-hUWARlnNLBRKcPgSRuEzAPtYkYZ2aA0bOlYxsLpieDpO2wDhvXr3xvHeFZK4bwoV_OT3eVphHEYxDKPYIfWjvEu_45SNwYlQTAacPTkYze684bVCYEN5Yyh8lhXE8hVLyKBzF4/s1600-h/picture471.JPG"><span style="font-family:verdana;"><img style="WIDTH: 224px; HEIGHT: 221px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5373242357769453442" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiojPdg-hUWARlnNLBRKcPgSRuEzAPtYkYZ2aA0bOlYxsLpieDpO2wDhvXr3xvHeFZK4bwoV_OT3eVphHEYxDKPYIfWjvEu_45SNwYlQTAacPTkYze684bVCYEN5Yyh8lhXE8hVLyKBzF4/s320/picture471.JPG" /></span></a><span style="font-family:verdana;">
<br />
<br />NQQuery.log:
<br />
<br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFikg1X5w5MvVz3sR1jqAlIRUP1gnMasnb4KZ9q1BgZpuIA0FLOELjqcSLINV04ZjGIq_NgSfz4arMtfzGYEJcm5yh2f0yST1ExeoIgYdaQhnPcJuIVNgggoNcoN380uqJWeUrH7xkvB3m/s1600-h/picture550.JPG"><img style="WIDTH: 320px; HEIGHT: 91px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5395086500435711794" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFikg1X5w5MvVz3sR1jqAlIRUP1gnMasnb4KZ9q1BgZpuIA0FLOELjqcSLINV04ZjGIq_NgSfz4arMtfzGYEJcm5yh2f0yST1ExeoIgYdaQhnPcJuIVNgggoNcoN380uqJWeUrH7xkvB3m/s320/picture550.JPG" /></a>
<br />
<br />Null (column col1 is null):
<br />
<br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxwkdRb13xzNHQlbWNJpT6hyLBPVrVXiAUrCKHerRAciArGM3IjC9osbQ1ILKBAjVW4L2lUw06AceMAH0UoL61tRLSibMsSRvuual2DCyVe5QVtpD5jThq5Xo40fXeyRLa8g54QWiUuU4l/s1600-h/picture472.JPG"><span style="font-family:verdana;"><img style="WIDTH: 222px; HEIGHT: 220px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5373242753227624594" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxwkdRb13xzNHQlbWNJpT6hyLBPVrVXiAUrCKHerRAciArGM3IjC9osbQ1ILKBAjVW4L2lUw06AceMAH0UoL61tRLSibMsSRvuual2DCyVe5QVtpD5jThq5Xo40fXeyRLa8g54QWiUuU4l/s320/picture472.JPG" /></span></a><span style="font-family:verdana;"> </span>
<br />
<br /><span style="font-family:verdana;">NQQuery.log:
<br /></span>
<br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKYvif4J8e0pgsZRQZaCdDfA_0H3PiZPlI1rqepf2LwWl-L5QVkQqQChoT5MSNmqtMdTaQEKh499N9WPSs67lqWU2_voAlsHbeRjguqTrgzlzHJHiWz8WZtVa1uKM6jjZV4X-MCytlC64e/s1600-h/picture551.JPG"><img style="WIDTH: 320px; HEIGHT: 91px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5395087546946042898" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKYvif4J8e0pgsZRQZaCdDfA_0H3PiZPlI1rqepf2LwWl-L5QVkQqQChoT5MSNmqtMdTaQEKh499N9WPSs67lqWU2_voAlsHbeRjguqTrgzlzHJHiWz8WZtVa1uKM6jjZV4X-MCytlC64e/s320/picture551.JPG" /></a>
<br />Goran Ockohttp://www.blogger.com/profile/16571461599213456839noreply@blogger.com0tag:blogger.com,1999:blog-196729317318279460.post-76572414298535239142009-10-20T10:08:00.004+02:002010-03-05T10:40:04.230+01:00Aggregates in OBIEE<span style="font-family:verdana;">Aggregate fact tables contain same measure data like in the lowest granularity fact table but summarized on certain level. Aggregates in obiee can be created using aggregate persistence wizard or manually.
<br />
<br />For the first option:
<br />
<br /><a href="http://www.oracle.com/technology/obe/obe_bi/bi_ee_1013/aggpersist/aggpersist.htm">http://www.oracle.com/technology/obe/obe_bi/bi_ee_1013/aggpersist/aggpersist.htm</a>
<br /><a href="http://www.rittmanmead.com/2007/10/26/using-the-obiee-aggregate-persistence-wizard">http://www.rittmanmead.com/2007/10/26/using-the-obiee-aggregate-persistence-wizard</a>
<br /><a href="http://obiee101.blogspot.com/2008/11/obiee-aggregate-persistence-wizard.html">http://obiee101.blogspot.com/2008/11/obiee-aggregate-persistence-wizard.html</a>
<br />
<br />Advanced option is using materialized views, dimensions and query rewrite.
<br />
<br />I'll show the second option (manually).
<br />
<br /><strong>Creating database objects</strong>
<br />
<br />For this example we'll create database objects, higher level dimension tables, aggregates, indexes, ect. Something about higher dimension tables, it depends how you understand normalized and denormalized structure in business intelligence term. Dimension tables are always denormalized, each level is placed inside it. If you for example query sh.products table you'll see that the lowest level has information about high levels. If you are using dimension operator in OWB to load data into, the result is dimension table with addition that all levels are separately loaded with each with its own ID, primary key. So other aggregation fact tables can reference high level dimension ID from the same dimension. The very similar way is how olap dimension works, see global.channel_dimview. Anyway, we'll create higher dimension level tables for this example purpose.
<br />
<br /><span style="font-size:85%;">create table months as
<br />select
<br />distinct
<br />calendar_month_id,
<br />calendar_month_desc,
<br />calendar_year_id,
<br />calendar_year
<br />from times
<br />
<br />alter table months
<br />add constraint
<br />months_pk primary key (calendar_month_id);
<br />
<br />create table categories as
<br />select
<br />distinct
<br />prod_category_id,
<br />prod_category
<br />from products
<br />
<br />alter table categories
<br />add constraint
<br />categories_pk primary key (prod_category_id)
<br />
<br />create table years as
<br />select
<br />distinct
<br />calendar_year_id,
<br />calendar_year
<br />from times
<br />
<br />alter table years
<br />add constraint
<br />years_pk primary key (calendar_year_id)
<br />
<br />create table sales_months as
<br />select
<br />t.calendar_month_id,
<br />sum(s.amount_sold) as amount_sold,
<br />sum(s.quantity_sold) as quantity_sold
<br />from sales s, times t
<br />where s.time_id=t.time_id
<br />group by t.calendar_month_id;
<br />
<br />alter table sales_months
<br />add constraint sm_months_fk
<br />foreign key (calendar_month_id)
<br />references months (calendar_month_id)
<br />
<br />create bitmap index sm_months_idx
<br />on sales_months (calendar_month_id);
<br />
<br />create table sales_year_cat as
<br />select
<br />t.calendar_year_id,
<br />p.prod_category_id,
<br />sum(s.quantity_sold) as quantity_sold,
<br />sum(s.amount_sold) as amount_sold
<br />from sales s, products p, times t
<br />where s.prod_id=p.prod_id
<br />and s.time_id=t.time_id
<br />group by t.calendar_year_id, p.prod_category_id;
<br />
<br />alter table sales_year_cat
<br />add constraint syc_years_fk
<br />foreign key (calendar_year_id)
<br />references years (calendar_year_id)
<br />
<br />create bitmap index syc_years_idx
<br />on sales_year_cat (calendar_year_id);
<br />
<br />alter table sales_year_cat
<br />add constraint syc_categories_fk
<br />foreign key (prod_category_id) references categories (prod_category_id)
<br />
<br />create bitmap index syc_categories_idx
<br />on sales_year_cat (prod_category_id);
<br />
<br />create table sales_months_cat_ch as
<br />select
<br />t.calendar_month_id,
<br />p.prod_category_id,
<br />c.channel_id,
<br />sum(s.quantity_sold) as quantity_sold,
<br />sum(s.amount_sold) as amount_sold
<br />from sales s, products p, times t, channels c
<br />where s.prod_id=p.prod_id
<br />and s.time_id=t.time_id
<br />and s.channel_id=c.channel_id
<br />group by t.calendar_month_id, p.prod_category_id, c.channel_id;
<br />
<br />alter table sales_months_cat_ch
<br />add constraint smcc_months_fk
<br />foreign key (calendar_month_id)
<br />references months (calendar_month_id)
<br />
<br />create bitmap index smcc_months_idx
<br />on sales_months_cat_ch (calendar_month_id);
<br />
<br />alter table sales_months_cat_ch
<br />add constraint smcc_channels_fk
<br />foreign key (channel_id) references channels (channel_id)
<br />
<br />create bitmap index smcc_channels_idx
<br />on sales_months_cat_ch (channel_id);
<br />
<br />alter table sales_months_cat_ch
<br />add constraint smcc_categories_fk
<br />foreign key (prod_category_id)
<br />references categories (prod_category_id)
<br />
<br />create bitmap index smcc_categories_idx
<br />on sales_months_cat_ch (prod_category_id);</span>
<br />
<br />The focus is on how to implement this in obiee, not how these tables are refreshed with data or recreated as a part of the job of ETL process.
<br />
<br /><strong>Implementation in obiee</strong>
<br />
<br />Physical layer:
<br />
<br /></span></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxiVV9aAFraTXE_oBnNZSgQKJv_8qVWQo06u4ua1-8fp6-xyaOVqF1Y7-xpdO4DYKPaqNqxs0NZ32ff7o3d7prVN_tZQfI0BGn-QAuhAiWnDFfhylsjchq-xi5cC9tIlujcAj6Zf4BMT0/s1600-h/picture145.jpg"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 218px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5295915674620177010" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxiVV9aAFraTXE_oBnNZSgQKJv_8qVWQo06u4ua1-8fp6-xyaOVqF1Y7-xpdO4DYKPaqNqxs0NZ32ff7o3d7prVN_tZQfI0BGn-QAuhAiWnDFfhylsjchq-xi5cC9tIlujcAj6Zf4BMT0/s320/picture145.jpg" /></span></a><span style="font-family:verdana;">
<br />
<br />Foreign keys:
<br />
<br />SALES.PRODUCT_ID >- PRODUCTS.PRODUCT_ID
<br />SALES.TIME_ID >- TIMES.TIME_ID
<br />SALES.CHANNEL_ID >- PRODUCTS.CHANNEL_ID
<br />
<br />SALES_MONTHS_CAT_CH.CHANNEL_ID >- CHANNELS.CHANNEL_ID
<br />SALES_MONTHS_CAT_CH.PROD_CATEGORY_ID >- CATEGORIES.PROD_CATEGORY_ID
<br />SALES_MONTHS_CAT_CH.CALENDAR_MONTH_ID >- MONTHS.CALENDAR_MONTH_ID
<br />
<br />SALES_YEAR_CAT.PROD_CATEGORY_ID >- CATEGORIES.PROD_CATEGORY_ID
<br />SALES_YEAR_CAT.CALENDAR_YEAR_ID >- YEARS.CALENDAR_YEAR_ID
<br />
<br />SALES_MONTHS.CALENDAR_MONTH_ID >- MONTHS.CALENDAR_MONTH_ID
<br />
<br />BMM:
<br />
<br />Drag and drop attributes from the physical layer to BMM, for example CALENDAR_YEAR_ID and CALENDAR_YEAR from YEARS physical table to TIMES logical table to create additional logical table sources. We repeat this step for other higher level dimension tables on the physical layer as weel as for SALES_MONTHS, SALES_YEAR_CAT and SALES_MONTHS_CAT_CH aggregate fact tables that contains measures AMOUNT_SOLD and QUANTITY_SOLD.
<br />
<br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLbgmYRViVN9M6EIo0-d-qhIqsaAGlrT7rAhOUIlsBtnBNbDtn_ALo0STPZXcI0Ivzp7LnfKNOEdKH-SwU4l3ZwPNoZzaeQP4Eo1RUsuVYWZM-MxAEpK4u9lPZaHUA2k1fQ1CnjjvKmrs/s1600-h/picture148.jpg"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 245px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5295963734346692978" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLbgmYRViVN9M6EIo0-d-qhIqsaAGlrT7rAhOUIlsBtnBNbDtn_ALo0STPZXcI0Ivzp7LnfKNOEdKH-SwU4l3ZwPNoZzaeQP4Eo1RUsuVYWZM-MxAEpK4u9lPZaHUA2k1fQ1CnjjvKmrs/s320/picture148.jpg" /></span></a><span style="font-family:verdana;">
<br />
<br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1wPopEcbpYmta6eS0gQIawPOTCzOneNAmvfmqnHdK6_HwMAwMLBhgkIeLDEKOSvMNcwo82QZU6RM7LiAKMljYA-UxfK5g500xlEk69lJOoum7ZtIGJQt0VNdIlnlZKholVEZ_i-ew0iM/s1600-h/picture146.jpg"><span style="font-family:verdana;"><img style="WIDTH: 154px; HEIGHT: 320px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5295961891166171282" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1wPopEcbpYmta6eS0gQIawPOTCzOneNAmvfmqnHdK6_HwMAwMLBhgkIeLDEKOSvMNcwo82QZU6RM7LiAKMljYA-UxfK5g500xlEk69lJOoum7ZtIGJQt0VNdIlnlZKholVEZ_i-ew0iM/s320/picture146.jpg" /></span></a><span style="font-family:verdana;">
<br />
<br />Dimensions:
<br />
<br /></span></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiE0pWBzEU1_rUpvlkZQ6Y4OajBNoIFtGpWiRnU6VWQum9_p6JrGo45iga9CiH01nv4gm2Xyj-8WyfdG2sEl2Z5o6uSD800iqHPfX6DeVvV3-sG8bkKXan5K6NWtquLhT8btwKRdMbzxrs/s1600-h/picture147.jpg"><span style="font-family:verdana;"><img style="WIDTH: 167px; HEIGHT: 320px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5295962356327018130" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiE0pWBzEU1_rUpvlkZQ6Y4OajBNoIFtGpWiRnU6VWQum9_p6JrGo45iga9CiH01nv4gm2Xyj-8WyfdG2sEl2Z5o6uSD800iqHPfX6DeVvV3-sG8bkKXan5K6NWtquLhT8btwKRdMbzxrs/s320/picture147.jpg" /></span></a><span style="font-family:verdana;">
<br />
<br />On each logical fact table source on the logical fact table SALES we need to set aggregation levels and this is mandatory step for obiee to redirect SQL query on aggregate tables.
<br />
<br />Aggregate sources are activated on certain levels of dimension.
<br />
<br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjy8Rd3VDrVRsyEfQSYGHDmkyeBdjA37j7y3bjJmeX7tJKjEsJfR8CINI7GqFR0wY5TeI8yRUe5kIvAMHG8fYoQ3rU8BthdPWlryzCUUm8D8XHB8cLBefKpRYF-vLnX60W79IdF-jHbZtE/s1600-h/picture149.jpg"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 188px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5295966458353512706" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjy8Rd3VDrVRsyEfQSYGHDmkyeBdjA37j7y3bjJmeX7tJKjEsJfR8CINI7GqFR0wY5TeI8yRUe5kIvAMHG8fYoQ3rU8BthdPWlryzCUUm8D8XHB8cLBefKpRYF-vLnX60W79IdF-jHbZtE/s320/picture149.jpg" /></span></a><span style="font-family:verdana;">
<br />
<br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgaz8HNJopEU24hsfJKY_ZYetSJK2_OgKd6gSJvJ8kz8EyEhXlQrUR4YnDqtPhyphenhyphen2oti78rPVZN0DPtbR3-UmhdsoqL67Y6dnEhX-PIEAMa-qMw6dV9pVRhErCW2XGLhRJt9EwXbTSXP_uU/s1600-h/picture150.jpg"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 188px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5295966612467508786" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgaz8HNJopEU24hsfJKY_ZYetSJK2_OgKd6gSJvJ8kz8EyEhXlQrUR4YnDqtPhyphenhyphen2oti78rPVZN0DPtbR3-UmhdsoqL67Y6dnEhX-PIEAMa-qMw6dV9pVRhErCW2XGLhRJt9EwXbTSXP_uU/s320/picture150.jpg" /></span></a><span style="font-family:verdana;">
<br />
<br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimvmuUWL-8TVeJfsjtbD-rS4_vgMJSe1JxRJQMBaCANd-KLzw7esqfjDvY6kBgoE_yTcSgLKOSlAUmO-aiKarb8AU8wOZ-JNgTTURRaiUJtEhBdUp_FIxqYhCPWDeS5j_dwaT_7-TcNoo/s1600-h/picture151.jpg"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 184px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5295966830139293186" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimvmuUWL-8TVeJfsjtbD-rS4_vgMJSe1JxRJQMBaCANd-KLzw7esqfjDvY6kBgoE_yTcSgLKOSlAUmO-aiKarb8AU8wOZ-JNgTTURRaiUJtEhBdUp_FIxqYhCPWDeS5j_dwaT_7-TcNoo/s320/picture151.jpg" /></span></a><span style="font-family:verdana;">
<br />
<br /><strong>Test</strong>
<br />
<br />If we add CALENDAR_MONTH_DESC, instead of going to SALES (TIME_ID lowest level) and summarize it on the month level, the SQL query is redirected to SALES_MONTHS:
<br />
<br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2p8NCLKvULxW_uk1W-FftRlXYgAudiA92K1ZSSqciaj3u61Eh6sR9QPkSMV51O9MLB3EAo78u9RwT7uFsliMmKdrYza5hHhsKqt5S-vPvjLTD-CwtcdtVeFuHzoR6iFFwdNgGtMr_thI/s1600-h/picture152.jpg"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 61px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5295969710266353506" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2p8NCLKvULxW_uk1W-FftRlXYgAudiA92K1ZSSqciaj3u61Eh6sR9QPkSMV51O9MLB3EAo78u9RwT7uFsliMmKdrYza5hHhsKqt5S-vPvjLTD-CwtcdtVeFuHzoR6iFFwdNgGtMr_thI/s320/picture152.jpg" /></span></a><span style="font-family:verdana;">
<br />
<br />NQQuery-log:
<br />
<br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitk2W9d_xuExvpNfI_2tYkT7IsxyNWZLoRLxAlLSjszhgALQRJfZTsJv05gAhjnsdh8Dtbs97ob-en6qIrBBiMHFXPp2gZNJ4QkIK5tWVsHlzT2ui2vzaexk-ATNrWGxP4EOhdw-Xfd7w/s1600-h/picture153.jpg"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 112px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5295969913992753698" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitk2W9d_xuExvpNfI_2tYkT7IsxyNWZLoRLxAlLSjszhgALQRJfZTsJv05gAhjnsdh8Dtbs97ob-en6qIrBBiMHFXPp2gZNJ4QkIK5tWVsHlzT2ui2vzaexk-ATNrWGxP4EOhdw-Xfd7w/s320/picture153.jpg" /></span></a><span style="font-family:verdana;">
<br />
<br />In case of CALENDAR_YEAR the SQL query is also redirected to SALES_MONTHS:
<br />
<br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixUGBX2WruGkkPOY51aRP0NA5l1x7DalE-fuHsLQXxtkbPM969TT7nBHJFQNOpzFMkKAAMdrCUBcMJbcvCC7NDD6nJ_FrieoxTef9soxRcsnoLUprIKcF1p74c2s1xPKagXWB4_yKIfn0/s1600-h/picture154.jpg"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 113px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5295970540494649890" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixUGBX2WruGkkPOY51aRP0NA5l1x7DalE-fuHsLQXxtkbPM969TT7nBHJFQNOpzFMkKAAMdrCUBcMJbcvCC7NDD6nJ_FrieoxTef9soxRcsnoLUprIKcF1p74c2s1xPKagXWB4_yKIfn0/s320/picture154.jpg" /></span></a><span style="font-family:verdana;">
<br />
<br />Some other cases:
<br />
<br />CALENDAR_MONTH_DESC, PROD_CATEGORY and CHANNEL_DESC:
<br />
<br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9dP88P1JFUz3aEUBrD2ijkAp_SAnW_Pqg6bL2LI7EzZj7AZlujP2o6NNv-E6cxXCatIkkyenUJRKJ5eAIWPcNxmOTierus_JiDz_Ez_2TKE2xYfL5gmBhV6eM50ah6zW_23hRw7N8PGw/s1600-h/picture155.jpg"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 34px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5295976917669984146" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9dP88P1JFUz3aEUBrD2ijkAp_SAnW_Pqg6bL2LI7EzZj7AZlujP2o6NNv-E6cxXCatIkkyenUJRKJ5eAIWPcNxmOTierus_JiDz_Ez_2TKE2xYfL5gmBhV6eM50ah6zW_23hRw7N8PGw/s320/picture155.jpg" /></span></a><span style="font-family:verdana;">
<br />
<br />NQQuery-log:
<br />
<br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEkWwBD6tQh4_UDL5O47xJa1oyBldeu1zNT_Y0sAA5dtWB6oarrJV7n9e0WP5stnDT9eXSr5JXiGj-izvZWQgouK_NJjqg1ziYpLGoGb0lViJD3DS6K1s2c38vIWgtS-XmNhyphenhyphenSQGKJXuA/s1600-h/picture156.jpg"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 98px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5295977452673807426" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEkWwBD6tQh4_UDL5O47xJa1oyBldeu1zNT_Y0sAA5dtWB6oarrJV7n9e0WP5stnDT9eXSr5JXiGj-izvZWQgouK_NJjqg1ziYpLGoGb0lViJD3DS6K1s2c38vIWgtS-XmNhyphenhyphenSQGKJXuA/s320/picture156.jpg" /></span></a><span style="font-family:verdana;">
<br />
<br />CALENDAR_YEAR and PROD_CATEGORY:
<br />
<br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGhoxnT2XUwyW-OECxaRChGMilhkuL1YG33oblsOpo64lTkiAUPJzbZ2UuhTnLwk7_3nngiO7eO0fhmHrjzLtVsy6gBpsc2A9XuO8xQCElTJfU5BRIJs5PfmLwY7eBBBK0Xqvxmdu_kWQ/s1600-h/picture157.jpg"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 46px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5295982657453211458" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGhoxnT2XUwyW-OECxaRChGMilhkuL1YG33oblsOpo64lTkiAUPJzbZ2UuhTnLwk7_3nngiO7eO0fhmHrjzLtVsy6gBpsc2A9XuO8xQCElTJfU5BRIJs5PfmLwY7eBBBK0Xqvxmdu_kWQ/s320/picture157.jpg" /></span></a><span style="font-family:verdana;">
<br />
<br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6ht7Li4UBz7vXWIqwTAhodSkz21I_7IY9Uj8Et2kI0xBvAF0awq2xRVfAhD-PQWFO7d9KAjxKF77pU9SHwiRP4jGFAbdVtbFX7LV4VpTey-6vByr0DW8l6tarnGMULC4DeZ_H5VHybtw/s1600-h/picture158.jpg"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 230px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5295983388009334498" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6ht7Li4UBz7vXWIqwTAhodSkz21I_7IY9Uj8Et2kI0xBvAF0awq2xRVfAhD-PQWFO7d9KAjxKF77pU9SHwiRP4jGFAbdVtbFX7LV4VpTey-6vByr0DW8l6tarnGMULC4DeZ_H5VHybtw/s320/picture158.jpg" /></span></a><span style="font-family:verdana;">
<br />
<br />NQQuery.log:
<br />
<br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixYe9JfXGJ7HgFMWU-omijSHZWTaY6uVMRv1oqSYRSCMtdAEMzww0QRzg9mfHnijY0LrJt4u_lXJUWQ7HpIUYK04DdP2xQ0nxxP0auYgdP8JUNWa02h71ncjWpLj4ke9vmZKM04bvvO54/s1600-h/picture159.jpg"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 129px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5295983653886334578" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixYe9JfXGJ7HgFMWU-omijSHZWTaY6uVMRv1oqSYRSCMtdAEMzww0QRzg9mfHnijY0LrJt4u_lXJUWQ7HpIUYK04DdP2xQ0nxxP0auYgdP8JUNWa02h71ncjWpLj4ke9vmZKM04bvvO54/s320/picture159.jpg" /></span></a><span style="font-family:verdana;">
<br /></span><span style="font-family:verdana;"></span>
<br />Goran Ockohttp://www.blogger.com/profile/16571461599213456839noreply@blogger.com1tag:blogger.com,1999:blog-196729317318279460.post-91653631262181700622009-10-14T09:31:00.006+02:002009-10-14T09:45:25.260+02:00OBIEE expert status on OTN forum<span style="font-family:verdana;">I got expert level status on the obiee OTN forum today:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAU5-4_lxhqDSASD6soj0ue1gXpp1KI7tJ2yfSTHhpBxBnCj0H0BtsNzZjKmPPSP1VMVb1sZBluFH7k3E6sGvPmEPVLFnub0c2BLo0MwUd18ds7QwVeAFVuYSUksynWaPyd1QfcKqCWOSX/s1600-h/picture540.JPG"><span style="font-family:verdana;"><img style="WIDTH: 137px; HEIGHT: 261px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5392356765299959906" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAU5-4_lxhqDSASD6soj0ue1gXpp1KI7tJ2yfSTHhpBxBnCj0H0BtsNzZjKmPPSP1VMVb1sZBluFH7k3E6sGvPmEPVLFnub0c2BLo0MwUd18ds7QwVeAFVuYSUksynWaPyd1QfcKqCWOSX/s320/picture540.JPG" /></span></a><span style="font-family:verdana;"><br /><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirKM4vKRQpN7RbXPpqd-1QCHLAqphYqLl6wdbSqpbB1C-8CfyLlFwhR9AFozASl3C4S_QKEDSUMpwv8QNY_yj9JYLHl1ZQ25uGlvpVXWzszriEMRn4fOyDZmHSRzkVZ1o-fkEi-FKgZj1A/s1600-h/picture541.JPG"><img style="WIDTH: 206px; HEIGHT: 15px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5392357940394607394" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirKM4vKRQpN7RbXPpqd-1QCHLAqphYqLl6wdbSqpbB1C-8CfyLlFwhR9AFozASl3C4S_QKEDSUMpwv8QNY_yj9JYLHl1ZQ25uGlvpVXWzszriEMRn4fOyDZmHSRzkVZ1o-fkEi-FKgZj1A/s320/picture541.JPG" /></a><br /><br />Thanks to everyone for points. </span>Goran Ockohttp://www.blogger.com/profile/16571461599213456839noreply@blogger.com3tag:blogger.com,1999:blog-196729317318279460.post-53357285345503063682009-10-12T16:19:00.004+02:002009-10-13T10:41:01.968+02:00Using more then one GO URL request navigation with HTML drop down list<span style="font-family:verdana;">There was a question on OTN forum </span><a href="http://forums.oracle.com/forums/thread.jspa?threadID=968563&tstart=0"><span style="font-family:verdana;">http://forums.oracle.com/forums/thread.jspa?threadID=968563&tstart=0</span></a><span style="font-family:verdana;"> and it's very good base for me to write this post on how to place multiple GO URL navigation to a different subject areas in one column using drop down list.<br /><br />In one of my previous posts </span><a href="http://108obiee.blogspot.com/2009/09/go-url-request-navigation-between.html"><span style="font-family:verdana;">http://108obiee.blogspot.com/2009/09/go-url-request-navigation-between.html</span></a><span style="font-family:verdana;"> I describe how to use/make GO URL request navigation between different subject areas.<br /><br />I this example we'll use GO URLs from previous post and put them in only one column and give the user ability which one GO URL navigation from the drop drown list to choose.<br /><br />As a reference for writing this post I use this link </span><a href="http://www.tek-tips.com/faqs.cfm?fid=2960"><span style="font-family:verdana;">http://www.tek-tips.com/faqs.cfm?fid=2960</span></a><span style="font-family:verdana;"> and thanks to that site for placing the code in. The code is combination of javascript and html select and option tag which makes drop down list and put links inside them. So when the user chooses value from the drop down list he navigates on the target report.<br /><br />This first thing is to make Answers report, I used my <span style="color:#ff0000;">Normal model subject area</span>:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqmGiX5BMdKXIonzs2VDYfC0YA0EII5T5hFcybJyyEO2ZaerDtbGthpNlAmufTpDNfIBwr2KgWdedTzAbYBYRDc2i_H5DOOQ3rHs9mhqLM152Uhd9QPWSHVoN7q6t7RtSQeJYm2ksOUhGv/s1600-h/picture530.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 82px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5391673903075142194" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqmGiX5BMdKXIonzs2VDYfC0YA0EII5T5hFcybJyyEO2ZaerDtbGthpNlAmufTpDNfIBwr2KgWdedTzAbYBYRDc2i_H5DOOQ3rHs9mhqLM152Uhd9QPWSHVoN7q6t7RtSQeJYm2ksOUhGv/s320/picture530.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Write expression with HTML select and option tag to make drop down list and inside put your GO URLs:<br /><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6e8X-tF7lRtR_1_POvJ9cii6TiqZHfEldPG2N5_xZEVntD_HrdAG-ALP-4wIGO0-nqMPzXHW0YPjeNQd6YyvLKBnhBPFmI-m4gXircJXIt34aOVgJYv1ZJrJIg5Y-Ew3IpbpwBgunTASI/s1600-h/picture531.JPG"><img style="WIDTH: 320px; HEIGHT: 102px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5391999693863344706" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6e8X-tF7lRtR_1_POvJ9cii6TiqZHfEldPG2N5_xZEVntD_HrdAG-ALP-4wIGO0-nqMPzXHW0YPjeNQd6YyvLKBnhBPFmI-m4gXircJXIt34aOVgJYv1ZJrJIg5Y-Ew3IpbpwBgunTASI/s320/picture531.JPG" /></a><br /><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpxqI7vK6LQ26C7c9Ugsjqpve0ilC-TXufWfOqyjGXkbkcuumLUH6MSu230Mant1Ad6Ft5nOizV9sxbxYCIv0pw0FzxaCclQJjmL1jb5hVR5p9StDfnORBpj8ook6dujSUlOX1yN2k_SJ7/s1600-h/picture532.JPG"><img style="WIDTH: 320px; HEIGHT: 129px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5392000127674609666" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpxqI7vK6LQ26C7c9Ugsjqpve0ilC-TXufWfOqyjGXkbkcuumLUH6MSu230Mant1Ad6Ft5nOizV9sxbxYCIv0pw0FzxaCclQJjmL1jb5hVR5p9StDfnORBpj8ook6dujSUlOX1yN2k_SJ7/s320/picture532.JPG" /></a><br /><br />We call javascript function inside column expression in Answers in the select tag and onChange so now we need to declare it somewhere.<br /><br />This can be done in the dashboard text object in the text properties:<br /><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjSyJbxVFpSlykdOqHf6wEg1dYvOQChn-3nFe2sjT0Fh8MnkyrLOPH95xUwVENZk30PQoHXLeSs7vH30cp_O1rAsWz_fqkep4liM5o7fooAXCQy-JevfydxvlCpzdzbtTOxn5SG8brwNbM/s1600-h/picture533.JPG"><img style="WIDTH: 320px; HEIGHT: 122px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5391693322140982258" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjSyJbxVFpSlykdOqHf6wEg1dYvOQChn-3nFe2sjT0Fh8MnkyrLOPH95xUwVENZk30PQoHXLeSs7vH30cp_O1rAsWz_fqkep4liM5o7fooAXCQy-JevfydxvlCpzdzbtTOxn5SG8brwNbM/s320/picture533.JPG" /></a><br /><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkIbhjbeKzZwS-Mj109VpojP9APnokexw3of9qwe69N6C4zmmJm4lEOgH0tM-ZHEjZzdD2-VwP5j6xHGt53AwklINVkqqZ_-TlckbzLN0qholXQGlQhyDm65_1WHZveq5pT-wE3H8dnOK4/s1600-h/picture534.JPG"><img style="WIDTH: 320px; HEIGHT: 105px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5391693679230793826" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkIbhjbeKzZwS-Mj109VpojP9APnokexw3of9qwe69N6C4zmmJm4lEOgH0tM-ZHEjZzdD2-VwP5j6xHGt53AwklINVkqqZ_-TlckbzLN0qholXQGlQhyDm65_1WHZveq5pT-wE3H8dnOK4/s320/picture534.JPG" /></a><br /><br />Now place report along with the text object inside the dashboard:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgaWc__TJM2wIlCsq_v_B7kts4eXz6KjSKt8EtuhmRftsR2kdQQwn7Sz6bs4yD8bskiKaDigyXnwQShuieTXiC8s9jAOMuP72UZsuzL_YZpgfTlJz_U1_u-Vf2rvtZNRkhnyWvcLMTN8neq/s1600-h/picture535.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 105px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5391681595511484114" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgaWc__TJM2wIlCsq_v_B7kts4eXz6KjSKt8EtuhmRftsR2kdQQwn7Sz6bs4yD8bskiKaDigyXnwQShuieTXiC8s9jAOMuP72UZsuzL_YZpgfTlJz_U1_u-Vf2rvtZNRkhnyWvcLMTN8neq/s320/picture535.JPG" /></span></a><span style="font-family:verdana;"><br /><br /><strong>Test</strong><br /><br />Initial start:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhD3HBYGWTkXpybnHbd1b1VaMhSx4yh5A1Qk5qDHm0055a9X0H_wEmN4KfwOa2bqDDrM9dfTXgiz8Ka2mvW9OUDrNTEit0UgbeqOVAmx5NQCsVExCsA2WgB52qznlvDe1sKyK3dnQ6YF-Rs/s1600-h/picture536.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 102px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5391683738679622450" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhD3HBYGWTkXpybnHbd1b1VaMhSx4yh5A1Qk5qDHm0055a9X0H_wEmN4KfwOa2bqDDrM9dfTXgiz8Ka2mvW9OUDrNTEit0UgbeqOVAmx5NQCsVExCsA2WgB52qznlvDe1sKyK3dnQ6YF-Rs/s320/picture536.JPG" /></span></a><span style="font-family:verdana;"><br /><br />The first report navigation from the drop down list:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8akQ0HtiQK5tdWCLhs1ZiyRAnLQDrg7nJRY4034CCBeaayxYHbAU73SNGiA-YkhPMzyxeC9J7q_7u9TbWIYHBfX0JGBg_OGtFhAqyqyy-gsopIYr9X8F3RMunPbyII_KeevNtoNvH6FEY/s1600-h/picture537.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 118px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5391684308892384338" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8akQ0HtiQK5tdWCLhs1ZiyRAnLQDrg7nJRY4034CCBeaayxYHbAU73SNGiA-YkhPMzyxeC9J7q_7u9TbWIYHBfX0JGBg_OGtFhAqyqyy-gsopIYr9X8F3RMunPbyII_KeevNtoNvH6FEY/s320/picture537.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Result:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1WP7XUj_XRWNNk8DAaXRwYLF3unrQy8hu0YOTAnYfhRBhwESajLJCXbzq1E6hqOEF1RqkcKPPe-v9Pw8vl1OiTYLauefhWQyWNVfZR8s9WqVxIomlYm0TaDIjuXLNMDrZyQnP9o7KtTtY/s1600-h/picture538.JPG"><span style="font-family:verdana;"><img style="WIDTH: 196px; HEIGHT: 82px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5391685049407062002" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1WP7XUj_XRWNNk8DAaXRwYLF3unrQy8hu0YOTAnYfhRBhwESajLJCXbzq1E6hqOEF1RqkcKPPe-v9Pw8vl1OiTYLauefhWQyWNVfZR8s9WqVxIomlYm0TaDIjuXLNMDrZyQnP9o7KtTtY/s320/picture538.JPG" /></span></a><span style="font-family:verdana;"><br /><br />The second report navigation from the drop down list:<br /><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgM4E0PqHdJhAUX97AF8hsui_wZkxRyykQFWisIzIG7AeKoYwNodL_imq7oTCT5XEIlPAMpIYAkw6r6UYKEm2egYKdBRTXKvzw97f85hrnmWFmNWqeqF8FwlvGlakFwvTP7qk-XFqdTvxu/s1600-h/picture539.JPG"><img style="WIDTH: 320px; HEIGHT: 116px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5392001497797001538" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgM4E0PqHdJhAUX97AF8hsui_wZkxRyykQFWisIzIG7AeKoYwNodL_imq7oTCT5XEIlPAMpIYAkw6r6UYKEm2egYKdBRTXKvzw97f85hrnmWFmNWqeqF8FwlvGlakFwvTP7qk-XFqdTvxu/s320/picture539.JPG" /></a><br /><br />Result:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXM2a1Py1sXfogApvwbRLyc1t8qd_uElxZIQG5g8gapzb_2nLc2gcT0gcLRc-I9Gdgrm5Dk_Ll1Nlf9xjRpw_RpvUFOl052hKf9BIOYSokWxNUq6g-IxNWHja-v0ld0wgBbxmZcEEutOuE/s1600-h/picture540.JPG"><span style="font-family:verdana;"><img style="WIDTH: 218px; HEIGHT: 119px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5391687965659106434" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXM2a1Py1sXfogApvwbRLyc1t8qd_uElxZIQG5g8gapzb_2nLc2gcT0gcLRc-I9Gdgrm5Dk_Ll1Nlf9xjRpw_RpvUFOl052hKf9BIOYSokWxNUq6g-IxNWHja-v0ld0wgBbxmZcEEutOuE/s320/picture540.JPG" /></span></a>Goran Ockohttp://www.blogger.com/profile/16571461599213456839noreply@blogger.com0tag:blogger.com,1999:blog-196729317318279460.post-79350784088836664622009-10-09T10:10:00.000+02:002009-10-09T10:11:47.136+02:00Referencing GROUP session variable in initialization blocks for different types of authentication<span style="font-family:verdana;">I was looking and reading some threads on OTN obiee forum about GROUP session variable on how to reference it in initialization blocks when using internal authentication. When I said internal authentication I mean that we don't use external table (normal or row-wise data in table) or any other form of authentication, just define users and groups internal in RPD and assign those users to one or many groups internally, in RPD.<br /><br />In this post I'll show how to reference GROUP session variable in initialization blocks for different types of authentication and whether it is even possible and if not what is the workaround for that. The idea is to use GROUP session variable in the target initialization block that returns index Yes or No if the user belongs to special group.<br /><br />You may read my previous post </span><a href="http://108obiee.blogspot.com/2009/03/external-table-authentication-and-row.html"><span style="font-family:verdana;">http://108obiee.blogspot.com/2009/03/external-table-authentication-and-row.html</span></a><span style="font-family:verdana;"> about external table authentication and row-wise initialization in OBIEE.<br /><br /><strong>Example one - users are assigned to groups internal (in the RPD)</strong><br /><br />Power user is assigned to Special Group in RPD:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBNevi4VOI7ZfJOQozIExUB1w0cIBCWznTcc07cFwIFCe-Vqf5Rp-I1LeOCj7caLgZqHxVAHjVwttimpNyWOq3ZA5SYwU08ZNsQukMRIa57Q0LlFsz98Ge71pLP9JQC6DmA0kwSuvHb0Ey/s1600-h/picture507.JPG"><span style="font-family:verdana;"><img style="WIDTH: 318px; HEIGHT: 320px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5388782090338133058" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBNevi4VOI7ZfJOQozIExUB1w0cIBCWznTcc07cFwIFCe-Vqf5Rp-I1LeOCj7caLgZqHxVAHjVwttimpNyWOq3ZA5SYwU08ZNsQukMRIa57Q0LlFsz98Ge71pLP9JQC6DmA0kwSuvHb0Ey/s320/picture507.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Now, make one initialization block that we'll use in all cases. It will give us Yes or No indicator if the user is the member of the Special Group and will populate session variable SPECIAL_GROUP:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2B6DXa7CFFCzG0FyUS6HRe59ecLq5VN9ro78wgZBsJl61-mpvzuLa7bcOLvSDO2X0PxyS3o8HllFWKSvd1IDEskJeVTh6hAkbG9LtWARnAZyWsahpBduV2yc6MBK17x4ygdajcoiz38nG/s1600-h/picture508.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 142px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5388782810359341202" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2B6DXa7CFFCzG0FyUS6HRe59ecLq5VN9ro78wgZBsJl61-mpvzuLa7bcOLvSDO2X0PxyS3o8HllFWKSvd1IDEskJeVTh6hAkbG9LtWARnAZyWsahpBduV2yc6MBK17x4ygdajcoiz38nG/s320/picture508.JPG" /></span></a><span style="font-family:verdana;"><br /><br /><span style="color:#ff0000;">select<br />case when INSTR('VALUEOF(NQ_SESSION.GROUP)', 'Special Group')>0 then 'Yes'<br />else 'No'<br />end<br />from dual</span><br /><br /><span style="color:#ff0000;">We need to use INSTR because the user can be a member of many groups.</span> In this example user Power is the member of three groups. <span style="color:#ff0000;">In normal condition we could retreive this session variable and receive data in this format:</span><br /><br /><span style="color:#ff0000;">Users (A-M);Users (N-Z);Special Group</span><br /><br /><span style="color:#ff0000;">Groups are separeted by semicolons.</span><br /><br />Log on to Answers with Power user:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjyq4jdotaJZqBV4zr7mCkH_LaFnLPGH4VSd8HgGxQJxybdcUQRVDEnetzpEghv1Wakr6OTVBeZfo1PpoA_DtnrcdFekci17FQRIRbTsM7WNiYzN3wrCSHjSgEB6F4aNz9sEtrQtNc0tV0c/s1600-h/picture509.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 182px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5388785258476508578" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjyq4jdotaJZqBV4zr7mCkH_LaFnLPGH4VSd8HgGxQJxybdcUQRVDEnetzpEghv1Wakr6OTVBeZfo1PpoA_DtnrcdFekci17FQRIRbTsM7WNiYzN3wrCSHjSgEB6F4aNz9sEtrQtNc0tV0c/s320/picture509.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Use the simple report to retrieve session variables from our initialization block:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjofATipdnyw0QAvtGg60AMgR5Wd79UAN5XowxraZesVx2Tt3v_ggeElVMxIIO2LD2oLw1Jh_V0KWICHsdPPLMEF5bjHXsz1qPFgCeAn7TdTm_O3DMmSMLz9bnl84qXsLuLt-b6qMqqi5PE/s1600-h/picture510.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 38px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5388786401094975426" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjofATipdnyw0QAvtGg60AMgR5Wd79UAN5XowxraZesVx2Tt3v_ggeElVMxIIO2LD2oLw1Jh_V0KWICHsdPPLMEF5bjHXsz1qPFgCeAn7TdTm_O3DMmSMLz9bnl84qXsLuLt-b6qMqqi5PE/s320/picture510.JPG" /></span></a><span style="font-family:verdana;"><br /><br />The result is:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiB9XzkopCOZlH93e3VRz1AohiA8w5ZdFil2R2IEYOuiYKIFBmHR4-SL_OiCE0XE-ZFgseS00n4oLtTGiVFCvhkPQhKHRvg-YSWimsjZPAj8SDruUCdHJjZSkSLSwhZhwY3v-57ihKR7BTB/s1600-h/picture511.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 66px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5388787077302087554" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiB9XzkopCOZlH93e3VRz1AohiA8w5ZdFil2R2IEYOuiYKIFBmHR4-SL_OiCE0XE-ZFgseS00n4oLtTGiVFCvhkPQhKHRvg-YSWimsjZPAj8SDruUCdHJjZSkSLSwhZhwY3v-57ihKR7BTB/s320/picture511.JPG" /></span></a><span style="font-family:verdana;"><br /><br />SPECIAL_GROUP takes default value Yes/No. This brings me the question why we cannot use the fact that we assign user to group(s) internal (in RPD) and use this information in VALUEOF(NQ_SESSION.GROUP) in initialization blocks.<br /><br />We see that VALUEOF(NQ_SESSION.GROUP) is working in Answers but not in initialization blocks when we used internal (RPD) authentication, to assing user to group(s).<br /><br />And now if we try to copy/paste code from initialization block for retreiving SPECIAL_GROUP variable into Answers, just replace INSTR with obiee LOCATE function:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHsQtVbiyJVLJ-64KbiQX7lz2BihyU_aEtFsH-pYLZ642h2LMMkY9Leu2ru4M_A9ImNP8eoZQkkKbA-Kux3BYSr4SySS7ArMZGEbK7uurta8Ep1wTdqWsxzqw3ZE3rcTw-fwCjSb0jTKnu/s1600-h/picture512.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 114px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5388792421745790578" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHsQtVbiyJVLJ-64KbiQX7lz2BihyU_aEtFsH-pYLZ642h2LMMkY9Leu2ru4M_A9ImNP8eoZQkkKbA-Kux3BYSr4SySS7ArMZGEbK7uurta8Ep1wTdqWsxzqw3ZE3rcTw-fwCjSb0jTKnu/s320/picture512.JPG" /></span></a><span style="font-family:verdana;"><br /><br /><span style="color:#ff0000;">case<br />when LOCATE('Special Group', VALUEOF(NQ_SESSION.GROUP))>0 then 'Yes'<br />else 'No'<br />end</span><br /><br />This code is equal to the one from the initialization block:<br /><br /><span style="color:#ff0000;">case </span></span><br /><span style="font-family:verdana;"><span style="color:#ff0000;">when INSTR('VALUEOF(NQ_SESSION.GROUP)', 'Special Group')>0 then 'Yes'<br />else 'No'<br />end</span><br /><br />And the results is:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjb82V_5o3DXmsyKTGtnowURccuIMUNn8vmRCT_lYQh57j_tSaBWKuIrCsB-Z53ulILoLMB7kMXaHbhORi1p-va0D984wc8hKn14s7yrpjOpstYPnO5w4MWL0RhyphenhyphenVUTKLK8B-eCybhd9buf/s1600-h/picture513.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 55px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5388793316161098370" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjb82V_5o3DXmsyKTGtnowURccuIMUNn8vmRCT_lYQh57j_tSaBWKuIrCsB-Z53ulILoLMB7kMXaHbhORi1p-va0D984wc8hKn14s7yrpjOpstYPnO5w4MWL0RhyphenhyphenVUTKLK8B-eCybhd9buf/s320/picture513.JPG" /></span></a><span style="font-family:verdana;"><br /><br /><span style="color:#ff0000;">Conclusion is that if at the end of all initialization blocks GROUP session variable is not filled (what is our example case) it will be filled with the groups that we have defined internal (in the RPD) for current user so therefore we couldn't reference it in the initialization block because it is not yet filled.</span><br /><br />So in case that we want to use GROUP session variable for this case in initialization block and if we need this SPECIAL_GROUP session variable indicator and we don't want to have external table authentication because we use internal user - group(s) authentication the workaround is:<br /><br />1. Make one initialization block for re-filling internal groups into GROUP session variable, just rewrite information from RPD for each user. This block will be execute before the target:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjadX-QAvBhNgYb3qZRTQ3pyvZ_klP3n2TAr3cwZrHhHw4x0hYsiVNvlq19Ke95kGB6mwDMYm6rOfDY1qHIdXHz4qVr93fOpX-LvD82P4FmyT9Dp_MARskyRY-WfOsuOVr3vhpQRy1w-0xC/s1600-h/picture514.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 144px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5388797734144619490" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjadX-QAvBhNgYb3qZRTQ3pyvZ_klP3n2TAr3cwZrHhHw4x0hYsiVNvlq19Ke95kGB6mwDMYm6rOfDY1qHIdXHz4qVr93fOpX-LvD82P4FmyT9Dp_MARskyRY-WfOsuOVr3vhpQRy1w-0xC/s320/picture514.JPG" /></span></a><span style="font-family:verdana;"><br /><br /><span style="color:#ff0000;">select<br />case<br />when ':USER'='Power' then 'Special Group;Users (A-M);Users (N-Z)'<br />end<br />from dual</span><br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_ABP4ZeAMvBGgD0x0Ne-X8iHRLYS-LmYaa4iENI5rg9kYpPjb7DuZu4csYiruGLD68zgooUF5gSyBjyvQePortTy0OqBbmPhbGLk5sWNKL6mj7CCJaZkU7am9XiNdid9Hhi11ww23oGl7/s1600-h/picture515.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 180px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5388798734064775490" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_ABP4ZeAMvBGgD0x0Ne-X8iHRLYS-LmYaa4iENI5rg9kYpPjb7DuZu4csYiruGLD68zgooUF5gSyBjyvQePortTy0OqBbmPhbGLk5sWNKL6mj7CCJaZkU7am9XiNdid9Hhi11ww23oGl7/s320/picture515.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Now, go to Answers and use the same report to retrieve SPECIAL_GROUP session variable from our initialization block:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjofATipdnyw0QAvtGg60AMgR5Wd79UAN5XowxraZesVx2Tt3v_ggeElVMxIIO2LD2oLw1Jh_V0KWICHsdPPLMEF5bjHXsz1qPFgCeAn7TdTm_O3DMmSMLz9bnl84qXsLuLt-b6qMqqi5PE/s1600-h/picture510.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 38px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5388786401094975426" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjofATipdnyw0QAvtGg60AMgR5Wd79UAN5XowxraZesVx2Tt3v_ggeElVMxIIO2LD2oLw1Jh_V0KWICHsdPPLMEF5bjHXsz1qPFgCeAn7TdTm_O3DMmSMLz9bnl84qXsLuLt-b6qMqqi5PE/s320/picture510.JPG" /></span></a><span style="font-family:verdana;"><br /><br />The result is:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjN1JLQScfXFGA0-N0CO4_PTw0XoxTRRMXwSUCP5wYxr-g4G4dAZnwU8St_i8iV31A3dK6L8SLXw2MrVdIj85k3CmwL14ujAqf53dn8BiP_yC1HTWS4NYZJuedvTkqi1ZhKdPO7H-MGHNam/s1600-h/picture516.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 63px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5388800701390571874" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjN1JLQScfXFGA0-N0CO4_PTw0XoxTRRMXwSUCP5wYxr-g4G4dAZnwU8St_i8iV31A3dK6L8SLXw2MrVdIj85k3CmwL14ujAqf53dn8BiP_yC1HTWS4NYZJuedvTkqi1ZhKdPO7H-MGHNam/s320/picture516.JPG" /></span></a><span style="font-family:verdana;"><br /><br />This works fine, but the VALUEOF(NQ_SESSION.GROUP) is taking groups from the RDP and the VALUEOF(NQ_SESSION.SPECIAL_GROUP) use groups filled from the initialization block b_int_rpb_user_groups.<br /><br />Note that if you assign user to groups in the RPD and do the same in initialization block the first one takes priority, and you can see this if you retrieve VALUEOF(NQ_SESSION.GROUP) in Answers.<br /><br />We don't want to have the same information twice or different information so we checkout groups for Power user in RPD:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqJ7tnMQQLjrq4UtNwxsNpdNlciBvSerPSoQl0hu9gajtRMspX4AAjen4yOHEFJUWMveyherPfXU3yqlj8KG0ESO_UTzKe2O9Zj5WCOkd0aDio-9BgMQpItcclqbRKuTEenJbZd-gVVc8H/s1600-h/picture517.JPG"><span style="font-family:verdana;"><img style="WIDTH: 313px; HEIGHT: 320px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5388802574909077954" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqJ7tnMQQLjrq4UtNwxsNpdNlciBvSerPSoQl0hu9gajtRMspX4AAjen4yOHEFJUWMveyherPfXU3yqlj8KG0ESO_UTzKe2O9Zj5WCOkd0aDio-9BgMQpItcclqbRKuTEenJbZd-gVVc8H/s320/picture517.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Now we use groups only from the initialization block b_int_rpb_user_groups:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkfe_Fahfw97oUjbJ1MffaUOPPa4j2yB4Wu6hj0L2OhUho78ejQCXysCpRrVg6xHgpEeFEKcXdpb3s77tFDnriYxdi9YPMwe1ZMeVKZ0f9KlGQzDmnoFZHisx5Cq1_4t1vUmma_vsM4rlD/s1600-h/picture518.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 63px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5388805902745350194" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkfe_Fahfw97oUjbJ1MffaUOPPa4j2yB4Wu6hj0L2OhUho78ejQCXysCpRrVg6xHgpEeFEKcXdpb3s77tFDnriYxdi9YPMwe1ZMeVKZ0f9KlGQzDmnoFZHisx5Cq1_4t1vUmma_vsM4rlD/s320/picture518.JPG" /></span></a><span style="font-family:verdana;"><br /><br /><strong>Example two - users are assigned to groups from external table</strong><br /><br />Assign Power user to multiple groups in external table:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8DBDTS0vj7iZGwkmonOE78wHt0t5hf0Dx9idOnNkJXdctbg5BQxq8Y_77NDMjweDrflgdYGPuppKWurn-zH4t5mS634PxJlslbU-LC5hgPp3YpKody3i4rK9vTYeRQUE6KASEpsprEn9K/s1600-h/picture519.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 102px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5388810404189761506" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8DBDTS0vj7iZGwkmonOE78wHt0t5hf0Dx9idOnNkJXdctbg5BQxq8Y_77NDMjweDrflgdYGPuppKWurn-zH4t5mS634PxJlslbU-LC5hgPp3YpKody3i4rK9vTYeRQUE6KASEpsprEn9K/s320/picture519.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Disable block b_int_rpb_user_groups from the previous example and use b_ext_tab_auth_all explained in </span><a href="http://108obiee.blogspot.com/2009/03/external-table-authentication-and-row.html"><span style="font-family:verdana;">http://108obiee.blogspot.com/2009/03/external-table-authentication-and-row.html</span></a><span style="font-family:verdana;">.<br /><br />This block takes information from external table and re-fill session variables USER, GROUP, DISPLAYNAME and LOGLEVEL:<br /><br /><span style="color:#ff0000;">select username, groupname, displayname, to_number(loglevel)<br />from OBIEE_EXT_TAB_AUTH<br />where username=':USER'<br />and password=':PASSWORD'</span><br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinnX1y74-GYZR6VIICjaO4py-aXWXA-tlPheVj94F4NMuFu-A3CJxmsMcdzP2sjtbJZBosJyIGL0B9H6MjmAZNjJVOAIzSelhkSCwZzdAOhvA-sO-QC1wvNXOw6O2xBKhf2GmyrFtHF2X7/s1600-h/picture520.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 188px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5388812171543819906" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinnX1y74-GYZR6VIICjaO4py-aXWXA-tlPheVj94F4NMuFu-A3CJxmsMcdzP2sjtbJZBosJyIGL0B9H6MjmAZNjJVOAIzSelhkSCwZzdAOhvA-sO-QC1wvNXOw6O2xBKhf2GmyrFtHF2X7/s320/picture520.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Use this block as execution precedence in the b_int_special_group_indicator block:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8aAR8xPosXrjXFXL4-pxgsAwJUHRkKoKw4y6JSIuSEjWQ1PWPWnYc91_0RnyyZbM4ai-k62j_QhxnL0F28DHNUMLRzde1e6NcV8WNJODzinDg00XtFZQjodeZZB54PIyeieJ1_hutHdg7/s1600-h/picture521.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 218px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5388813509831191666" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8aAR8xPosXrjXFXL4-pxgsAwJUHRkKoKw4y6JSIuSEjWQ1PWPWnYc91_0RnyyZbM4ai-k62j_QhxnL0F28DHNUMLRzde1e6NcV8WNJODzinDg00XtFZQjodeZZB54PIyeieJ1_hutHdg7/s320/picture521.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Test in Answers and result:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiC8kDky6k65q3Y_uf3ajGTT933ViUG3RnGlEMZWw4qnrgFU5FuQxX3iLqmZw5d7tdOcMzC-0PaNh3Gir7WdLR5pNYeY8ChyphenhyphenM6t0rZIoZl8aIU1x12325LTH60lFJMyGVtwHls8p3yBeTbQ/s1600-h/picture522.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 46px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5388816245617585778" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiC8kDky6k65q3Y_uf3ajGTT933ViUG3RnGlEMZWw4qnrgFU5FuQxX3iLqmZw5d7tdOcMzC-0PaNh3Gir7WdLR5pNYeY8ChyphenhyphenM6t0rZIoZl8aIU1x12325LTH60lFJMyGVtwHls8p3yBeTbQ/s320/picture522.JPG" /></span></a><span style="font-family:verdana;"><br /><br />The SPECIAL_GROUP session variable is filled correct because we used external table autentication for re-filling GROUP session variable in initialization block before.<br /><br /><strong>Example three - users are assigned to groups from external table using row-wise initialization</strong><br /><br />USER session variable is authenticated (and re-filled) from normal external table:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUd_iDKSNoCY-GjZaUWA32YOhfirW_dBtCzGVBCulLljRsnYhcEGzs7mLsZ2MOU7rZKUAEXEiTsJm8YyWu5MYIyNYnrrktC8wIr5pjOLEMPmvvsdEL2H-KE7Bl6KKgbPAKtBZrzCAbpYX1/s1600-h/picture523.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 134px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5388819011860636146" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUd_iDKSNoCY-GjZaUWA32YOhfirW_dBtCzGVBCulLljRsnYhcEGzs7mLsZ2MOU7rZKUAEXEiTsJm8YyWu5MYIyNYnrrktC8wIr5pjOLEMPmvvsdEL2H-KE7Bl6KKgbPAKtBZrzCAbpYX1/s320/picture523.JPG" /></span></a><span style="font-family:verdana;"><br /><br /><span style="color:#ff0000;">select username<br />from OBIEE_EXT_TAB_AUTH<br />where username=':USER'<br />and password=':PASSWORD'</span><br /><br />Other session variables we re-filled from row-wise initialization:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghMosB6mjAFewWPbNY9ppULwjZKz3HOdUUaUYqVyJaIhoW0c0Hl5rAAqOVLhnjWxFaGTEMe8tf9oo484lZyty9mickyXe911X6JXLG8D4Rgg2YeIT5a1q83N3oyhbcDNK2brR4AgYYwmh7/s1600-h/picture524.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 215px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5388820567786487218" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghMosB6mjAFewWPbNY9ppULwjZKz3HOdUUaUYqVyJaIhoW0c0Hl5rAAqOVLhnjWxFaGTEMe8tf9oo484lZyty9mickyXe911X6JXLG8D4Rgg2YeIT5a1q83N3oyhbcDNK2brR4AgYYwmh7/s320/picture524.JPG" /></span></a><span style="font-family:verdana;"><br /><br /><span style="color:#ff0000;">select<br />session_variable_name,<br />session_variable_value<br />from obiee_row_wise_init<br />where username=':USER'</span><br /><br />Row-wise external table:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhaZZ2PNq8UKfVPWuIv2FP5Da9WR8qtNdQV24qoqdAu6jdLxlVskkontUyXNEZ-4YlljFllg1ZUBLoMv-MeSulNW-aNngyFdX9yMRd1r5kQ4UlQ7Vn3HwCvTuc7ksMYKqkYBDKq0U5lPLCI/s1600-h/picture525.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 60px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5388821513867029410" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhaZZ2PNq8UKfVPWuIv2FP5Da9WR8qtNdQV24qoqdAu6jdLxlVskkontUyXNEZ-4YlljFllg1ZUBLoMv-MeSulNW-aNngyFdX9yMRd1r5kQ4UlQ7Vn3HwCvTuc7ksMYKqkYBDKq0U5lPLCI/s320/picture525.JPG" /></span></a><span style="font-family:verdana;"><br /><br />The block for SPECIAL_GROUP session variable is the same like in previous examples:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgK_E7SzCNvwSLfUUUugluvVhP46j7X0UWIVR8oDMcFkdwkKyDL9wlgSwJ9c9gLOYGA8iYL_ezh4uT9uhxKGQjhN6gI0_3Us4T0jxR3bzpEjpr5sIqszYhgDSf4hyphenhyphenluIm3x1uwQE8KHrpKS/s1600-h/picture526.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 226px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5388823315039998402" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgK_E7SzCNvwSLfUUUugluvVhP46j7X0UWIVR8oDMcFkdwkKyDL9wlgSwJ9c9gLOYGA8iYL_ezh4uT9uhxKGQjhN6gI0_3Us4T0jxR3bzpEjpr5sIqszYhgDSf4hyphenhyphenluIm3x1uwQE8KHrpKS/s320/picture526.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Test in Answers and result:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgd9rpaTn9wufErvBBuV_o0b7QRbPv6l7FmJjtpoRS8eIODeVrBkmmAaEctWKHmA8P0y7DQ59QfxpIrpTbYL3XTDI9u4RnboLeCVU3geJoCS7HTfGwhqjBJ5nH35fsviuyjpRA9tbye5lZ4/s1600-h/picture527.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 82px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5388823931017855714" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgd9rpaTn9wufErvBBuV_o0b7QRbPv6l7FmJjtpoRS8eIODeVrBkmmAaEctWKHmA8P0y7DQ59QfxpIrpTbYL3XTDI9u4RnboLeCVU3geJoCS7HTfGwhqjBJ5nH35fsviuyjpRA9tbye5lZ4/s320/picture527.JPG" /></span></a><span style="font-family:verdana;"><br /><br />The SPECIAL_GROUP session variable is filled correct even when we used external table autentication for USER session variable and row-wise initialization for re-filling GROUP and other session variables in initialization block before.</span>Goran Ockohttp://www.blogger.com/profile/16571461599213456839noreply@blogger.com0tag:blogger.com,1999:blog-196729317318279460.post-51769519587003360192009-10-01T09:20:00.003+02:002009-10-26T20:22:49.832+01:00Using multiple values row wise session variables in dashboard prompts and requests<span style="font-family:verdana;">In this post I'll show how to use multiple values session variable in the dashboard prompt and how to re-set it and use it in the request.<br /><br />There are some questions in OTN forum like this one </span><a href="http://forums.oracle.com/forums/thread.jspa?threadID=962729&tstart=15"><span style="font-family:verdana;">http://forums.oracle.com/forums/thread.jspa?threadID=962729&tstart=15</span></a><span style="font-family:verdana;"> about using multiple values in variable and how to put them in the dashboard prompt as predefined values.<br /><br />First at all the only way to achieve this is using multiple values row-wise session variable in initialization block. You are able to use it only in the WHERE condition of the SQL Results of the dashboard prompt and not in the prompt edit column formula.<br /><br />If we do this in prompt edit column formula we get error:<br /><br /><span style="color:#ff0000;">The session variable, NQ_SESSION.VARIABLE, is defined as Row-Wise Initialization. It is restricted to usage with equality comparisons.</span><br /><br />The same error we get if we make the same in the Answers edit column formula.<br /><br />So if you intend to use it in the WHERE condition a mandatory thing is to have table in the presentation layer with the same data, to filter the same data that already exists in the table.<br /><br />At this point I ask myself the question why would we use variable with multiple values at all? We could simply hardcode any value or any set of values in the SQL Results in WHERE condition of the dashboard prompt.<br /><br /><span style="color:#ff0000;">Note that you cannot use multi-select control and have possibility to set presentation or session variable from the dashboard prompt. So in this example we'll use drop-down list control and leave possibility to set session or presentation variable.</span><br /><br />So if you have for example SQL Results like:<br /><br /><span style="color:#ff0000;">SELECT PRODUCTS.PROD_NAME FROM "Normal model" where PRODUCTS.PROD_CATEGORY=('Hardware', 'Electronics')</span><br /><br />you could simply replace it with:<br /><br /><span style="color:#ff0000;">SELECT PRODUCTS.PROD_NAME FROM "Normal model" where PRODUCTS.PROD_NAME=VALUEOF(NQ_SESSION.PRODUCTS)</span><br /><br />Where PRODUCTS session variable is a multiple values session variable that we get from the row wise initialization block.<br /><br />With using multiple values in variable the advantage is that you don't harcode value in the dashboard prompt and the end user don't see the code and if you want to change set of values you do that in the RPD be changing the code of your initialization block.<br /><br />So lets take one simple example of using multiple values row wise session variable.<br /><br /><strong>Example one</strong><br /><br />Initialization block:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBNaoO8kvnhV5EBjxyEWAdWl3lrZDC7I_UFLqQXZ73SgMje1EEHajBbdBDc8AznPRB2ZySSM10sGoyS0TmfOfDkhq7Xjxj2pnBoYYdeLttxQq1e6ug0ZAmJfxZQ6Bsos73FM28r-wOLNhc/s1600-h/picture480.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 153px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5386446500212227666" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBNaoO8kvnhV5EBjxyEWAdWl3lrZDC7I_UFLqQXZ73SgMje1EEHajBbdBDc8AznPRB2ZySSM10sGoyS0TmfOfDkhq7Xjxj2pnBoYYdeLttxQq1e6ug0ZAmJfxZQ6Bsos73FM28r-wOLNhc/s320/picture480.JPG" /></span></a><span style="font-family:verdana;"><br /><br /></span><span style="font-family:verdana;"><span style="color:#ff0000;">select 'PRODUCTS', prod_name from<br />(<br />select prod_name as prod_name from sh.products<br />where prod_category in ('Hardware', 'Electronics')<br />)</span><br /><br />We use row-wise initialization:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9Jl_YU8fndG8_4xAxExBDGDiiWp_taOnqvFlRMQTIqLysFQuXELxXHeUqI_pqxf-LBqoNsP6QlP3V4kKRe6fHos67KWQ3tWhOQ4uxqtuJSRwAgdaMUiCx8g_8QjQMQR7I9VxRYZ4-D8I4/s1600-h/picture481.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 258px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5386447185176987138" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9Jl_YU8fndG8_4xAxExBDGDiiWp_taOnqvFlRMQTIqLysFQuXELxXHeUqI_pqxf-LBqoNsP6QlP3V4kKRe6fHos67KWQ3tWhOQ4uxqtuJSRwAgdaMUiCx8g_8QjQMQR7I9VxRYZ4-D8I4/s320/picture481.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Variable test:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTGCyeCbmTnMLyjh_nhRW8Z7TMgITb7I6aNFaGH3rR2veCKB4xnu8G8Ub7kk8GSBhR1IYFpQXqkekf5u_xLI-H3nYXv7HJJpCxyY1AmMYt2K_A8OENeReCcr0U5Rf_Ce8G4swvY1oHQJpK/s1600-h/picture482.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 207px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5386447618505136514" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTGCyeCbmTnMLyjh_nhRW8Z7TMgITb7I6aNFaGH3rR2veCKB4xnu8G8Ub7kk8GSBhR1IYFpQXqkekf5u_xLI-H3nYXv7HJJpCxyY1AmMYt2K_A8OENeReCcr0U5Rf_Ce8G4swvY1oHQJpK/s320/picture482.JPG" /></span></a><span style="font-family:verdana;"><br /><br />So, this is our list of the products that we'll use in the dashboard prompt and request. We use only products that are in the list, for the Hardware and Electronics product group.<br /><br />Report in Answers:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1qvREY6jWlPqhzfIP1P0MheaKZOxua_CoSWiPPjozrs3JDoo7VVbH-dyuzIUo2fkUlSEjnKO_AH5LarZcIhFcLgRKiyGwfJrLRrumucEYldo2983-XshTQT94S5w4L1Km4pMNxe2Vw33F/s1600-h/picture483.JPG"><span style="font-family:verdana;"><img style="WIDTH: 213px; HEIGHT: 207px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5386449973377605618" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1qvREY6jWlPqhzfIP1P0MheaKZOxua_CoSWiPPjozrs3JDoo7VVbH-dyuzIUo2fkUlSEjnKO_AH5LarZcIhFcLgRKiyGwfJrLRrumucEYldo2983-XshTQT94S5w4L1Km4pMNxe2Vw33F/s320/picture483.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Dashboard prompt:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFU57NmWX7NHV0hc2O8andB5yadNZ9o-CugHHpTSSquWCJRTkKZf8aMkDUE23F0CVStMyMTAB54YKeTa6bZ4p1AkwfWWMs3PoVcgg8c2RS2225cj9deC2GsSqaLPCVcyhCua4ZuI6aiHGe/s1600-h/picture484.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 40px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5386462482473772834" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFU57NmWX7NHV0hc2O8andB5yadNZ9o-CugHHpTSSquWCJRTkKZf8aMkDUE23F0CVStMyMTAB54YKeTa6bZ4p1AkwfWWMs3PoVcgg8c2RS2225cj9deC2GsSqaLPCVcyhCua4ZuI6aiHGe/s320/picture484.JPG" /></span></a><span style="font-family:verdana;"><br /><br />SQL Results:<br /><br /><span style="color:#ff0000;">SELECT PRODUCTS.PROD_NAME FROM "Normal model" where PRODUCTS.PROD_NAME=VALUEOF(NQ_SESSION.PRODUCTS)</span><br /><br />Our list:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3QP-EUFRuSbtdmjc8thNQuUJymu50vm-Ee0F7sYhAjL8c1mudLLwTnWYyMQqpJ8aXtrJe7QpfY8Osr0qOpo3DtBXEDpY0iKICNHkGud7q2ssCB3b4AmyuUPnu9hlSEkxo7375lEVTZG8s/s1600-h/picture486.JPG"><span style="font-family:verdana;"><img style="WIDTH: 287px; HEIGHT: 286px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5386465011615410146" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3QP-EUFRuSbtdmjc8thNQuUJymu50vm-Ee0F7sYhAjL8c1mudLLwTnWYyMQqpJ8aXtrJe7QpfY8Osr0qOpo3DtBXEDpY0iKICNHkGud7q2ssCB3b4AmyuUPnu9hlSEkxo7375lEVTZG8s/s320/picture486.JPG" /></span></a><span style="font-family:verdana;"><br /><br />We put dashboard prompt and request on the dashboard page.<br /><br /><span style="color:#ff0000;">In the list we have only 15 products and at initial request start we get more products than we have in the list because the prompt is not filled with any products in the list and we get all products from the PRODUCTS table (we use IS PROMPTED in the request)</span><span style="color:#ff0000;">:</span><br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOC7x9v_m2eaL3Un8igjZQt1ZpQRS9qSVlW6itx2Oh73SiHIraCCYdAAnp_TK-D5ZEpZGRv4lvPnhEd6VQBGMFSTcTOFQMdVoU26UpTiRKfII60O2g7vCGHDKOsUY-66PgowP0xgwnbIJ1/s1600-h/picture485.JPG"><span style="font-family:verdana;"><img style="WIDTH: 193px; HEIGHT: 320px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5386463581405757186" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOC7x9v_m2eaL3Un8igjZQt1ZpQRS9qSVlW6itx2Oh73SiHIraCCYdAAnp_TK-D5ZEpZGRv4lvPnhEd6VQBGMFSTcTOFQMdVoU26UpTiRKfII60O2g7vCGHDKOsUY-66PgowP0xgwnbIJ1/s320/picture485.JPG" /></span></a><span style="font-family:verdana;"><br /><br />The same is for All Choices.<br /><br />The query is:<br /><br /></span><span style="font-family:verdana;"><span style="color:#ff0000;">select T21473.PROD_NAME as c1,<br />sum(T20550.QUANTITY_SOLD) as c2<br />from<br />SALES T20550,<br />PRODUCTS T21473<br />where ( T20550.PROD_ID = T21473.PROD_ID )<br />group by T21473.PROD_NAME<br />order by c1</span><br /><br />How to get only products that are in the list, at initial start, not all products from the table?<br /><br />1. Duplicate initialization block that sets PRODUCTS row-wise session variable:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicO91jK62uPQwU7QI_P-8bw3z0dNdtq1DI_ohDxOG25X-iAjkN43gnjLauXpFS9I8lkDGi7KFHGPpOYnVsQ6X-elHdfRR24gZazWsPmaAKAkQGvPY9aj3m1MFWmg6x0cxvOleqcy4q6tC9/s1600-h/picture486.JPG"><span style="font-family:verdana;"><img style="WIDTH: 265px; HEIGHT: 173px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5386837478219242018" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicO91jK62uPQwU7QI_P-8bw3z0dNdtq1DI_ohDxOG25X-iAjkN43gnjLauXpFS9I8lkDGi7KFHGPpOYnVsQ6X-elHdfRR24gZazWsPmaAKAkQGvPY9aj3m1MFWmg6x0cxvOleqcy4q6tC9/s320/picture486.JPG" /></span></a><span style="font-family:verdana;"><br /><br />In the new block write:<br /><br /></span><span style="font-family:verdana;"><span style="color:#ff0000;">select 'PRODUCTS2', prod_name from<br />(<br />select prod_name as prod_name from sh.products<br />where prod_category in ('Hardware', 'Electronics')<br />)</span><br /><br />2. In the dashboard prompt turn off All Choices:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwu4F2RWb1Vn_nKZnEXsV3iDGR1JvOwu-5GuwgXT7YrIVk28L3Pe8TEF6hpu77d87leGtmzhyJkBWM-9TnXA6X-rrfcqV7TYIJZmU7fxrGvw2euM1xNX0_AUU8kUAkGucvMlDNcEjHCIO9/s1600-h/picture487.JPG"><span style="font-family:verdana;"><img style="WIDTH: 89px; HEIGHT: 24px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5386837910952308210" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwu4F2RWb1Vn_nKZnEXsV3iDGR1JvOwu-5GuwgXT7YrIVk28L3Pe8TEF6hpu77d87leGtmzhyJkBWM-9TnXA6X-rrfcqV7TYIJZmU7fxrGvw2euM1xNX0_AUU8kUAkGucvMlDNcEjHCIO9/s320/picture487.JPG" /></span></a><span style="font-family:verdana;"><br /><br />In the SQL Results add the line:<br /><br /></span><span style="font-family:verdana;"><span style="color:#ff0000;">union all<br />select case when 1=2 then PRODUCTS.PROD_NAME else 'All Choices' end From "Normal model"</span><br /><br />3. Set request (session) variable PRODUCTS2 in the dashboard prompt:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6Hx4ItoNNkgfW5ICQTb7blaMJtYoth30AFySEAejlC9YcgEDUkae8KrLb9hAWCsAV2CKb_P-DaoYEmvawv4ySOPS1u-BfDKa8MLAdBEx3jstwBlrbQ82OjwoKpVERXTxfFgjUMdjdMMei/s1600-h/picture485.JPG"><span style="font-family:verdana;"><img style="WIDTH: 136px; HEIGHT: 75px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5386836661062224418" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6Hx4ItoNNkgfW5ICQTb7blaMJtYoth30AFySEAejlC9YcgEDUkae8KrLb9hAWCsAV2CKb_P-DaoYEmvawv4ySOPS1u-BfDKa8MLAdBEx3jstwBlrbQ82OjwoKpVERXTxfFgjUMdjdMMei/s320/picture485.JPG" /></span></a><span style="font-family:verdana;"><br /><br />4. In the Answers report remove IS PROMPTED and add in advanced convert this filter to SQL option:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCy08smc47sBAnX9sDXZgfIxL60JYrSwx_STj_qY5TtpRISBHLZ-UXMjcMXCoOJRu8K7g2L5xTM7N3CRsfM8r64AC2sDKXwjZC7TyAnhV85FNb4iTOlVDXC8qdUQTK_xBGCGaYLng32W54/s1600-h/picture489.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 107px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5386839403214799730" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCy08smc47sBAnX9sDXZgfIxL60JYrSwx_STj_qY5TtpRISBHLZ-UXMjcMXCoOJRu8K7g2L5xTM7N3CRsfM8r64AC2sDKXwjZC7TyAnhV85FNb4iTOlVDXC8qdUQTK_xBGCGaYLng32W54/s320/picture489.JPG" /></span></a><span style="font-family:verdana;"><br /><br /><span style="color:#ff0000;">(VALUEOF(NQ_SESSION.PRODUCTS2)='All Choices' and PRODUCTS.PROD_NAME=VALUEOF(NQ_SESSION.PRODUCTS)) or PRODUCTS.PROD_NAME = VALUEOF(NQ_SESSION.PRODUCTS2)</span><br /><br />Explanation what we did:<br /><br />At initial, the report goes to OR part and returns all products (all products that we have defined in the list). For that we use PRODUCTS2 session variable (cloned). We harcode All Choices in the prompt, and initialize it so we need to re-set session variable PRODUCTS2 with this value. If PRODUCTS2 are All Choices we use original PRODUCTS session variable to get again all rows (first part). And if we choose single value from the prompt we re-set PRODUCTS2 session variable and use the OR part of the query.<br /><br />We could resolve this by set presentation variable in the dashboard prompt pv_products and use only this code in the report filter:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhE87nEL_rWmLXd7-xNgfvQpqkjOdn3JHwE6GOBDIciFF2igTM-qjn7e10uX8jw8larqdUV19kvgrnWfUEDQM_1VyzEMsGBPn-RcSmRQZSoW5WfJYSqE6ZxeuG2pETmiZswQ_qAOePRTm9v/s1600-h/picture490.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 106px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5386856954510469778" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhE87nEL_rWmLXd7-xNgfvQpqkjOdn3JHwE6GOBDIciFF2igTM-qjn7e10uX8jw8larqdUV19kvgrnWfUEDQM_1VyzEMsGBPn-RcSmRQZSoW5WfJYSqE6ZxeuG2pETmiZswQ_qAOePRTm9v/s320/picture490.JPG" /></span></a><span style="font-family:verdana;"><br /><br /></span><span style="font-family:verdana;"><span style="color:#ff0000;">(<br />('@{pv_products}' like '%pv%' or '@{pv_products}' ='')<br />and PRODUCTS.PROD_NAME=VALUEOF(NQ_SESSION.PRODUCTS)<br />)<br />or PRODUCTS.PROD_NAME = '@{pv_products}'</span><br /><br />If you are using presentation variable remove union all part from the SQL Results and leave All Choices box as enabled on the dashboard prompt:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiP5CVzBf9RjnXlu8m0zsNgAc3AhHN0Y-lscAPaSUq5FSg_r0xUBTflYhzKgYWwsDXZvWCV7C_0BB0-Tmj9VaALwIZP5BoF8sD3haOoGG_IOcTwPbcr0Yuzoko4RxmwjujV3xuhiqho7nAD/s1600-h/picture491.JPG"><span style="font-family:verdana;"><img style="WIDTH: 87px; HEIGHT: 22px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5386857643416936274" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiP5CVzBf9RjnXlu8m0zsNgAc3AhHN0Y-lscAPaSUq5FSg_r0xUBTflYhzKgYWwsDXZvWCV7C_0BB0-Tmj9VaALwIZP5BoF8sD3haOoGG_IOcTwPbcr0Yuzoko4RxmwjujV3xuhiqho7nAD/s320/picture491.JPG" /></span></a><span style="font-family:verdana;"><br /><br /><strong>Test</strong><br /><br />Initial start:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNRuIAKlmAym4ZfCCF30i0skONfCSXMHC32HgJdMk93s4_SYEoy3n-OsfizEwGvJW7wGJJxh5dTwB8Yl1wZRzk-h5FSuurqyojhqdUKgTmG3wDMjukMQmvSxLAcuz1P5Nm45ryZDXzMi8n/s1600-h/picture492.JPG"><span style="font-family:verdana;"><img style="WIDTH: 269px; HEIGHT: 320px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5386858914623420162" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNRuIAKlmAym4ZfCCF30i0skONfCSXMHC32HgJdMk93s4_SYEoy3n-OsfizEwGvJW7wGJJxh5dTwB8Yl1wZRzk-h5FSuurqyojhqdUKgTmG3wDMjukMQmvSxLAcuz1P5Nm45ryZDXzMi8n/s320/picture492.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Only products that are included in the prompt list.<br /><br />NQQuery.log:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1GH5Y7Wj71OGjzOR7tk8r8yS4T8w7TitmxXIMSv3gFEo-nvmqDiypPsqHGhPKc9gE3vRmIDKsDCGYZLWIKWVKGYZF6dR7nOUdzDYTYAFQmZHbYrNyzeTgUWLEIHj-3h_sjTGsljL9YmxZ/s1600-h/picture493.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 106px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5386859971422430770" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1GH5Y7Wj71OGjzOR7tk8r8yS4T8w7TitmxXIMSv3gFEo-nvmqDiypPsqHGhPKc9gE3vRmIDKsDCGYZLWIKWVKGYZF6dR7nOUdzDYTYAFQmZHbYrNyzeTgUWLEIHj-3h_sjTGsljL9YmxZ/s320/picture493.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Now, set value to Bounce and GO:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8iUKSmVSlk2i-1BOqCSbQG35zyoiKcaUYDL6Eemh6q7YDlV7N8H5q8r76mZJSggwZ2vMy8hhXjtxEFLk4-phfjZI8cul_-kLXqh4WJYlk_EITl_8axeBPDRygUXYIqx9eG7tE4ZpqWdBX/s1600-h/picture494.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 139px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5386860981639254834" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8iUKSmVSlk2i-1BOqCSbQG35zyoiKcaUYDL6Eemh6q7YDlV7N8H5q8r76mZJSggwZ2vMy8hhXjtxEFLk4-phfjZI8cul_-kLXqh4WJYlk_EITl_8axeBPDRygUXYIqx9eG7tE4ZpqWdBX/s320/picture494.JPG" /></span></a><span style="font-family:verdana;"><br /><br />If you now look the NQQuery.log you'll see that we set PRODUCTS2 session variable with choosen value (Bounce):<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi41sWHHU6KqM133CB6D-Fap9Xsam5EisOrx-AqF4nuy4wB6bYeRVCmcvVC5w58QHfIDf_4Vw6mkMNYOx-ouEDiFcD2rkqKgpYWM32ndVu5kmWw4eusgPrQHLQzn0DZsjfP0V5hWNQ4ag3U/s1600-h/picture495.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 22px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5386861784447563282" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi41sWHHU6KqM133CB6D-Fap9Xsam5EisOrx-AqF4nuy4wB6bYeRVCmcvVC5w58QHfIDf_4Vw6mkMNYOx-ouEDiFcD2rkqKgpYWM32ndVu5kmWw4eusgPrQHLQzn0DZsjfP0V5hWNQ4ag3U/s320/picture495.JPG" /></span></a><span style="font-family:verdana;"><br /><br />The same result we get if we use the combination of presentation variable pv_products and multiple values row wise session variable.<br /><br />Now lets look another example, more complex.<br /><br /><strong>Example two</strong><br /><br />For the UserA and UserB we'll read product groups from our row-wise initialization table (in this example it is more like LOV table) and populate it into row-wise initialization block that return product list for each user and product group.<br /><br />I'll use the row wise initialization table like in my previous post </span><a href="http://108obiee.blogspot.com/2009/03/external-table-authentication-and-row.html"><span style="font-family:verdana;">http://108obiee.blogspot.com/2009/03/external-table-authentication-and-row.html</span></a><span style="font-family:verdana;"><br /><br />Create four new entries for the user UserA and UserB in the table:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1arTRS8MCuZUor-VLGBnXUNW6ywneAznroOJRdX885Qwa0LDNvXB-2VU7WMu6eC1JL6Zc1BPsjBu17E9_sin9qcA-0DIoQXP_uNJzFkq7Zzg8pahYShqvsEtxuIUODYnjaLTYX1DP5tw6/s1600-h/picture500.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 236px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5387213290057811026" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1arTRS8MCuZUor-VLGBnXUNW6ywneAznroOJRdX885Qwa0LDNvXB-2VU7WMu6eC1JL6Zc1BPsjBu17E9_sin9qcA-0DIoQXP_uNJzFkq7Zzg8pahYShqvsEtxuIUODYnjaLTYX1DP5tw6/s320/picture500.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Initialization block:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjc8jGb3AOUG3TtpMAoSn35qLDNv6aKLEQ_O_1zjBMcIEETpxyvKvY3-sICnB2zQhStN1BEj7SmrYuuw-wiGuqg6w3pno4Tg27idgB1UfCMt-EzrkWbVuaRElPo4nerVYRurQ4jbGaPzQO/s1600-h/picture501.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 178px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5387222044109320834" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjc8jGb3AOUG3TtpMAoSn35qLDNv6aKLEQ_O_1zjBMcIEETpxyvKvY3-sICnB2zQhStN1BEj7SmrYuuw-wiGuqg6w3pno4Tg27idgB1UfCMt-EzrkWbVuaRElPo4nerVYRurQ4jbGaPzQO/s320/picture501.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Leave duplicated block from previous example and update the code inside:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMQYje5jdE8tZf3uxDszXdBvg_5cV80GtSaMUwbSWKExryDNMooT2_pp5pJP0LTgUGrTPjwqsUH7wsienGJbiS6JU-31flUkTElQrb9AXuf_pIQuZ4tBL1n8eI4g9zVNxX-MHb2wCr7FVX/s1600-h/picture502.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 182px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5387228098229106866" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMQYje5jdE8tZf3uxDszXdBvg_5cV80GtSaMUwbSWKExryDNMooT2_pp5pJP0LTgUGrTPjwqsUH7wsienGJbiS6JU-31flUkTElQrb9AXuf_pIQuZ4tBL1n8eI4g9zVNxX-MHb2wCr7FVX/s320/picture502.JPG" /></span></a><span style="font-family:verdana;"><br /><br />When used, these blocks and coresponding row-wise session variables will return all products that users can see, UserA sees only products in the Hardware and Electronics and UserB Software/Other and Photo product group.<br /><br />We used the same request with filter and dashboard prompt like in previous example.<br /><br /><strong>Test</strong><br /><br />Log in with UserA:<br /><br />Initial start (all products visible for UserA, 15 products):<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkkx6WQdmPPW4otk9zZnI3QIW8YZTA-0AF0ROWWqWTT2Iaw2iWm2h38hl7ymniFPdgWzbj1U-N1eAzKT0UkYqCCEAugYH6CVdl9fiPMXpDM5X-XcQqjqaSG_9Wms7Vx4Pbt7lqGoooHxQV/s1600-h/picture503.JPG"><span style="font-family:verdana;"><img style="WIDTH: 291px; HEIGHT: 320px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5387267213339295986" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkkx6WQdmPPW4otk9zZnI3QIW8YZTA-0AF0ROWWqWTT2Iaw2iWm2h38hl7ymniFPdgWzbj1U-N1eAzKT0UkYqCCEAugYH6CVdl9fiPMXpDM5X-XcQqjqaSG_9Wms7Vx4Pbt7lqGoooHxQV/s320/picture503.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Product list for UserA:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpSN6Tl0c4wS736uyPwoqufiIIazqfI-TglEDhM7Q0pKHMrQUDktUREU7XneC_ZkKr7Jmi3gElk2wmzorHzXrF8YQy0NzVQ_nqW5HsLtyxXh1A-1vuJJ7BQHqDWy0laWfWRpvzgbwZioBq/s1600-h/picture504.JPG"><span style="font-family:verdana;"><img style="WIDTH: 273px; HEIGHT: 270px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5387267949114485138" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpSN6Tl0c4wS736uyPwoqufiIIazqfI-TglEDhM7Q0pKHMrQUDktUREU7XneC_ZkKr7Jmi3gElk2wmzorHzXrF8YQy0NzVQ_nqW5HsLtyxXh1A-1vuJJ7BQHqDWy0laWfWRpvzgbwZioBq/s320/picture504.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Log in with UserB:<br /><br />Initial start (all products visible for UserB, 35 products):<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuBr5ve265k7DUhup3huFcuja3tYhODysMZfuzT8wOy0_lmopPH1BLxoyPqEkxSFAn69wsvkOrFr_nlvN2joi6n2bxImNYIymZIOTqV7IghegLFR5kV8YNCWThvNoKMo_jwgPPo9G2dwLH/s1600-h/picture505.JPG"><span style="font-family:verdana;"><img style="WIDTH: 177px; HEIGHT: 320px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5387268774859727426" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuBr5ve265k7DUhup3huFcuja3tYhODysMZfuzT8wOy0_lmopPH1BLxoyPqEkxSFAn69wsvkOrFr_nlvN2joi6n2bxImNYIymZIOTqV7IghegLFR5kV8YNCWThvNoKMo_jwgPPo9G2dwLH/s320/picture505.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Product list for UserB (notice All Choices that we add in the prompt):<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSD86-Se1NqsN86_oVgy-MSTmB7ul2AnJuUWdxVsA7qQrV7Rzf5HtyCPAeLaM11U_O-NG9Wk9YracckLgHefmM2B3aX2z__54apzqkQM1-FTBE3p94LZb2z1x6479S9FFjIFXk3FSLoYEK/s1600-h/picture506.JPG"><span style="font-family:verdana;"><img style="WIDTH: 159px; HEIGHT: 320px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5387269261198380002" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSD86-Se1NqsN86_oVgy-MSTmB7ul2AnJuUWdxVsA7qQrV7Rzf5HtyCPAeLaM11U_O-NG9Wk9YracckLgHefmM2B3aX2z__54apzqkQM1-FTBE3p94LZb2z1x6479S9FFjIFXk3FSLoYEK/s320/picture506.JPG" /></span></a>Goran Ockohttp://www.blogger.com/profile/16571461599213456839noreply@blogger.com0tag:blogger.com,1999:blog-196729317318279460.post-83657871448216252342009-09-11T10:34:00.004+02:002009-09-11T10:52:07.796+02:00GO URL request navigation between different subject areas<span style="font-family:verdana;">I this post I'll show how to navigate with GO URL between different subject areas (presentation areas, one presentation area is equal to one BMM area).
<br />
<br />Example one:
<br />
<br />Navigation is between <span style="color:#ff0000;">Normal model subject area</span> and <span style="color:#33ff33;">Normal model subject area two</span>, which has only renamed logical tables and columns, the physical source is the same for both areas.
<br />
<br />BMM subject areas:
<br />
<br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEha7Af2Zktxir4CCO7rVYr_wO2uwmj1Issolh6Eg_rmfCR2soGZDmLFTmzXCe06W2lWXMzDQcfomZZHESf7kqWB0g_0ROwcbhjhk8k4kpAGsmwMgLMAPvTpKI2XgiC41vk9KtU-1m8V0jU/s1600-h/picture441.JPG"><span style="font-family:verdana;"><img style="WIDTH: 170px; HEIGHT: 320px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5369063605250056674" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEha7Af2Zktxir4CCO7rVYr_wO2uwmj1Issolh6Eg_rmfCR2soGZDmLFTmzXCe06W2lWXMzDQcfomZZHESf7kqWB0g_0ROwcbhjhk8k4kpAGsmwMgLMAPvTpKI2XgiC41vk9KtU-1m8V0jU/s320/picture441.JPG" /></span></a><span style="font-family:verdana;">
<br />
<br />Presentation area:
<br />
<br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqO1JKLkRH_aYu3ptfbCDbRIvpslTNPqHh9j8-RFOsTlCuHOZiUyVOpxs_vvnu1erbNgm50z-mm-Vpnj6ouOagXqqTgIZudOM0r_AmE_Ih_EwYSNpNADXWnjQzgryhOdtHD0b0JgNpSGo/s1600-h/picture449.JPG"><span style="font-family:verdana;"><img style="WIDTH: 190px; HEIGHT: 176px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5369077801529426434" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqO1JKLkRH_aYu3ptfbCDbRIvpslTNPqHh9j8-RFOsTlCuHOZiUyVOpxs_vvnu1erbNgm50z-mm-Vpnj6ouOagXqqTgIZudOM0r_AmE_Ih_EwYSNpNADXWnjQzgryhOdtHD0b0JgNpSGo/s320/picture449.JPG" /></span></a><span style="font-family:verdana;">
<br />
<br />The source report that uses Normal model subject area:
<br />
<br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuQI2gH-cP3nplcbdI6NPL8e9RFSqzq03s0wMU3sb4dnuSST9r6YYfrFGTnJAK4opKfkRWEKZz8MARn7gwc3ryNB5cbMzCurivAMDhabjxrbbZhywG1j3GobnYSJhRFjm-781uLzIXEb0/s1600-h/picture442.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 117px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5369064114621263906" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuQI2gH-cP3nplcbdI6NPL8e9RFSqzq03s0wMU3sb4dnuSST9r6YYfrFGTnJAK4opKfkRWEKZz8MARn7gwc3ryNB5cbMzCurivAMDhabjxrbbZhywG1j3GobnYSJhRFjm-781uLzIXEb0/s320/picture442.JPG" /></span></a><span style="font-family:verdana;">
<br />
<br />The target report that uses Normal model subject area two:
<br />
<br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmDQd2xxpMWsre649VLn16ApoU4089jQ7baQ8AutM2TtqtkV0tZJA_ZqjKhaATWkdGqRpaMd2EQGFk6Lvf3SiM36FpDgvkvWf2ZpnLoD-fKlPYiva8ImFk7JE_d55ouAMRLZ86BR2h7q4/s1600-h/picture443.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 115px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5369064808420620738" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmDQd2xxpMWsre649VLn16ApoU4089jQ7baQ8AutM2TtqtkV0tZJA_ZqjKhaATWkdGqRpaMd2EQGFk6Lvf3SiM36FpDgvkvWf2ZpnLoD-fKlPYiva8ImFk7JE_d55ouAMRLZ86BR2h7q4/s320/picture443.JPG" /></span></a><span style="font-family:verdana;">
<br />
<br />Column GO URL to Report 26 on the source report:
<br />
<br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwi7Vh0GvH0OXBznsHcrpWfFqQS08x-DhBR7xTkjEiq-jwYM6oeMH_gl4KXAhh-D18WLDZhtVpiqBTxdX58Ap-sTnrxZA0uirMtghltIkVxKrNJSUxfVzVpB_JGhVDglMUT0b8c7q1HFY/s1600-h/picture444.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 150px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5369066243416347474" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwi7Vh0GvH0OXBznsHcrpWfFqQS08x-DhBR7xTkjEiq-jwYM6oeMH_gl4KXAhh-D18WLDZhtVpiqBTxdX58Ap-sTnrxZA0uirMtghltIkVxKrNJSUxfVzVpB_JGhVDglMUT0b8c7q1HFY/s320/picture444.JPG" /></span></a><span style="font-family:verdana;">
<br />
<br /><span style="color:#33ff33;">P2 (target report column) -> PROD.PR_CAT.</span>
<br /><span style="color:#ff0000;">P3 (source report column) -> PRODUCTS.PROD_CATEGORY.</span>
<br />
<br /><strong>Test</strong>
<br />
<br />I put the source report on the dashboard page.
<br />
<br />We will navigate from the third row (Peripherals and Accessories) from the GO URL to Report 26 column:
<br />
<br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwCtsHT1AXpdbucTyurMwiQFDxY6wRvJATUdTW5JKqtNq2ovGcYoYEpETsyhejtMUdu5WAnN5EwdH27ETAky-1-Ret0lRS5pM4MmBksfvPjxjYlgiR9mqkMfxkCLosjwPDKP5wunL_xCA/s1600-h/picture445.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 154px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5369068860433239026" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwCtsHT1AXpdbucTyurMwiQFDxY6wRvJATUdTW5JKqtNq2ovGcYoYEpETsyhejtMUdu5WAnN5EwdH27ETAky-1-Ret0lRS5pM4MmBksfvPjxjYlgiR9mqkMfxkCLosjwPDKP5wunL_xCA/s320/picture445.JPG" /></span></a><span style="font-family:verdana;">
<br />
<br />Before navigation, NQQuery.log for this report:
<br />
<br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3ePHCmFr0vHo9gdna-EJWDq6-MKKNxMDEBeLQHMBjiggvTj_dlRqpBKPNmH02JIEqhOa8KuIKOjpqY7qnbXeU1F_y7tunL2Cuj0ekHxON0b8GnAZkDbLZdj8K1yY7y96Jt5_xTtAM3Lg/s1600-h/picture446.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 160px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5369069774425238754" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3ePHCmFr0vHo9gdna-EJWDq6-MKKNxMDEBeLQHMBjiggvTj_dlRqpBKPNmH02JIEqhOa8KuIKOjpqY7qnbXeU1F_y7tunL2Cuj0ekHxON0b8GnAZkDbLZdj8K1yY7y96Jt5_xTtAM3Lg/s320/picture446.JPG" /></span></a><span style="font-family:verdana;">
<br />
<br />When navigate to the target report we get:
<br />
<br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQrbwbn1xkmZayie7EdUBdBNpYAylusdqyo85NHw5gFmIWaEgJ0TddQbrOAhHGdmXOzv_5u6ZnrlVXt_gGiNjIQdZj-eThmeLt22_WHUcx1ljH201fh0qglA7DF348fv-_K8f_8X6qOkc/s1600-h/picture447.JPG"><span style="font-family:verdana;"><img style="WIDTH: 274px; HEIGHT: 115px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5369075201775447890" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQrbwbn1xkmZayie7EdUBdBNpYAylusdqyo85NHw5gFmIWaEgJ0TddQbrOAhHGdmXOzv_5u6ZnrlVXt_gGiNjIQdZj-eThmeLt22_WHUcx1ljH201fh0qglA7DF348fv-_K8f_8X6qOkc/s320/picture447.JPG" /></span></a><span style="font-family:verdana;">
<br />
<br />NQQuery.log for this (target) report:
<br />
<br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrzgWR6NcYlqCUbhovxcbR7P7Rof1iHotz0sRmgGnyXPRtut5Oe9qMS61YuQH7NM81YrpBkYaGP1twE77pUa8uKvpQF2SsJ1xj6Tli0Be7faXKAWjw34SzzulSG2vH8BRr-Zp0_ftWYpg/s1600-h/picture448.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 140px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5369076895415101762" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrzgWR6NcYlqCUbhovxcbR7P7Rof1iHotz0sRmgGnyXPRtut5Oe9qMS61YuQH7NM81YrpBkYaGP1twE77pUa8uKvpQF2SsJ1xj6Tli0Be7faXKAWjw34SzzulSG2vH8BRr-Zp0_ftWYpg/s320/picture448.JPG" /></span></a><span style="font-family:verdana;">
<br />
<br />We see that navigation works fine in this example, when we have navigation between different subject areas that use the same physical tables, the filter is applied on the second report column (logical PROD.PR_CAT, physical PRODUCT.PROD_CATEGORY).
<br />
<br />Example two:
<br />
<br />Navigation is between <span style="color:#ff0000;">Normal model subject area</span> and <span style="color:#33ff33;">Normal model subject area three</span>, which has new the physical source, table CATEGORIES with column PROD_CATEGORY, our target column for navigation.
<br />
<br />BMM subject areas:
<br />
<br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEha0-kMYaqcH3yKrgJuYmFP6Z1ks3DYeXPipprWf-MlXFWv6ej0K18nS4buVnMnfCMhub5l-oxzsUZCvzTNuqh-9ImFQoeAWjIazMLhn9ynxj3dDBTOOl-EhpVUB74Y0nzDF2eQVLQA4CA/s1600-h/picture450.JPG"><span style="font-family:verdana;"><img style="WIDTH: 190px; HEIGHT: 258px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5369079049684523874" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEha0-kMYaqcH3yKrgJuYmFP6Z1ks3DYeXPipprWf-MlXFWv6ej0K18nS4buVnMnfCMhub5l-oxzsUZCvzTNuqh-9ImFQoeAWjIazMLhn9ynxj3dDBTOOl-EhpVUB74Y0nzDF2eQVLQA4CA/s320/picture450.JPG" /></span></a><span style="font-family:verdana;">
<br />
<br />Presentation area:
<br />
<br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOR_rrrswypeCyLByOzlvWMcRATVq-BS-ELz0XA7n0OX12pdiTX8ZCvnYhGTrB1U8xVeuBlToTrK_wDiuImTdBdV6BMgR5UTNNpemEDXrkFLyr8MwvFaXklLgh24px0hauBIsOtXVzKB8/s1600-h/picture451.JPG"><span style="font-family:verdana;"><img style="WIDTH: 190px; HEIGHT: 127px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5369079498132281570" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOR_rrrswypeCyLByOzlvWMcRATVq-BS-ELz0XA7n0OX12pdiTX8ZCvnYhGTrB1U8xVeuBlToTrK_wDiuImTdBdV6BMgR5UTNNpemEDXrkFLyr8MwvFaXklLgh24px0hauBIsOtXVzKB8/s320/picture451.JPG" /></span></a><span style="font-family:verdana;">
<br />
<br />The source report is the same as in the previous example that uses Normal model subject area.
<br />
<br />The target report that uses Normal model subject area three:
<br />
<br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_XY_Z4ei_SvlVgbiXHDxnjjjnuDtxTMTuVu-icXD00YSlaSqtlaLQmlcUAJkDpYZh5cFxDXSM-b95xPFqXhsU9NTsqU15Lp-d-Fvt58kEZULZFZDXpI0fqESombldKe-GGhrIEC2wVxg/s1600-h/picture452.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 106px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5369081531856047858" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_XY_Z4ei_SvlVgbiXHDxnjjjnuDtxTMTuVu-icXD00YSlaSqtlaLQmlcUAJkDpYZh5cFxDXSM-b95xPFqXhsU9NTsqU15Lp-d-Fvt58kEZULZFZDXpI0fqESombldKe-GGhrIEC2wVxg/s320/picture452.JPG" /></span></a><span style="font-family:verdana;">
<br />
<br />Column GO URL to Report 26 subject area three on the source report:
<br />
<br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0q_FEhkH_s4R51mJx0-gYaXmIlHf1CWQ3LVCPHVAgf7pvdfWPksfbA-kNrxT4ebKrjumNSUUC8HysmE8_R6rhSGrgGqPuErmgc2Ce2JjnUQBgM88i4u0dkkuIdIZYSv90yKJ48Cm3OpY/s1600-h/picture453.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 138px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5369082357319100066" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0q_FEhkH_s4R51mJx0-gYaXmIlHf1CWQ3LVCPHVAgf7pvdfWPksfbA-kNrxT4ebKrjumNSUUC8HysmE8_R6rhSGrgGqPuErmgc2Ce2JjnUQBgM88i4u0dkkuIdIZYSv90yKJ48Cm3OpY/s320/picture453.JPG" /></span></a><span style="font-family:verdana;">
<br />
<br /><span style="color:#33ff33;">P2 (target report column) -> CATEGORIES.PROD_CATEGORY.</span>
<br /><span style="color:#ff0000;">P3 (source report column) -> PRODUCTS.PROD_CATEGORY.</span>
<br />
<br /><strong>Test</strong>
<br />
<br />We will navigate from the third row (Peripherals and Accessories), from the GO URL to Report 26 subject area three column:
<br />
<br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYS7Uu5Zk9N1x-xZaHV8qmgRJTohTmaH1nx2yjHfoyrotSt7JHRZUMIYywWtcgFSTSgfo74uFbBT-dJlP_7GAZpkepYKvvBS_3Tpaajo2-9Q-jIxbKGBWzqw0I9-sw5lS9XIPr0jZzK_M/s1600-h/picture454.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 145px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5369083659705360178" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYS7Uu5Zk9N1x-xZaHV8qmgRJTohTmaH1nx2yjHfoyrotSt7JHRZUMIYywWtcgFSTSgfo74uFbBT-dJlP_7GAZpkepYKvvBS_3Tpaajo2-9Q-jIxbKGBWzqw0I9-sw5lS9XIPr0jZzK_M/s320/picture454.JPG" /></span></a><span style="font-family:verdana;">
<br />
<br />When navigate to the target report we get:
<br />
<br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjESM7YO6IiPsXPDSyaNPRqI3g2uN_3dofNwF6rFVzVBol1wybxXn3OtJJnHW4vfabEUvj6pL6_xPSeoznwRHdUBqiZTjyPtAfWICGIiw2ejifAR10jG4Wzam9ZTV-tVABMidpKd5W34Kk/s1600-h/picture455.JPG"><span style="font-family:verdana;"><img style="WIDTH: 190px; HEIGHT: 81px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5369084111882555346" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjESM7YO6IiPsXPDSyaNPRqI3g2uN_3dofNwF6rFVzVBol1wybxXn3OtJJnHW4vfabEUvj6pL6_xPSeoznwRHdUBqiZTjyPtAfWICGIiw2ejifAR10jG4Wzam9ZTV-tVABMidpKd5W34Kk/s320/picture455.JPG" /></span></a><span style="font-family:verdana;">
<br />
<br />NQQuery.log for this (target) report:
<br />
<br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwJgKNmClWhXeiBi5cG9xBemDknTTvT0eo-YD3KOoXZl4KgdNWSIE4A58m6Pj7X2-7P2RgqrU3lfHrBXKCNkpktqsqYQKNWZd9WRPc0ijTh-BcVp-iKRl3J98X5qHteEg8RBmnptqMR9M/s1600-h/picture456.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 118px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5369085770152242306" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwJgKNmClWhXeiBi5cG9xBemDknTTvT0eo-YD3KOoXZl4KgdNWSIE4A58m6Pj7X2-7P2RgqrU3lfHrBXKCNkpktqsqYQKNWZd9WRPc0ijTh-BcVp-iKRl3J98X5qHteEg8RBmnptqMR9M/s320/picture456.JPG" /></span></a><span style="font-family:verdana;">
<br />
<br />We see that navigation works fine in this example, when we have navigation between different subject areas that use different physical tables, the filter is applied on the second report column (logical CATEGORIES.PROD_CATEGORY, physical CATEGORIES.PROD_CATEGORY).
<br /></span><span style="font-family:verdana;"></span>Goran Ockohttp://www.blogger.com/profile/16571461599213456839noreply@blogger.com1tag:blogger.com,1999:blog-196729317318279460.post-62684203298602311542009-08-22T17:01:00.002+02:002009-08-22T19:29:41.807+02:00OBIEE navigation between different dashboards, passing multiple parameters<span style="font-family:verdana;">In this post I'll show how to navigate from the source dashboard page on the one dashboard to the target dashboard page on the second dashboard with passing multiple parameters.<br /><br />I want to navigate from the <span style="color:#ff0000;">Test Page 2 on Development 2</span> dashboard:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOv-mAH8KkPqFGSKI_VLQAlZLdF-L2oSEiihtbhccIAI_moRlJKwYSX4U1zLg-08rmtTXKauw2HyiaygIbGFXE8gSAgETpkAfl0Yp7s1V_zc22VlBo2w_rn_rLMbtuQ_230GpsiyvYu3I/s1600-h/picture457.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 202px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5370541149942518962" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOv-mAH8KkPqFGSKI_VLQAlZLdF-L2oSEiihtbhccIAI_moRlJKwYSX4U1zLg-08rmtTXKauw2HyiaygIbGFXE8gSAgETpkAfl0Yp7s1V_zc22VlBo2w_rn_rLMbtuQ_230GpsiyvYu3I/s320/picture457.JPG" /></span></a><span style="font-family:verdana;"><br /><br />To the <span style="color:#33ff33;">Test Page 2 on Development 3</span> dashboard and pass parameters to target dahboard prompts:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTUcFJ7x1A0DRZ-cTRaDIyuOu5VMHv4jJnnjEeDv8ta3LbYdYsQULMCx9s5bRgBpr1AvZ04UfzJBibVPHpKU6woPSloC0Q6gJC2PMaCIuhjVcFFtQ07oCpVXOhMSlemwChHT0Op58iSBY/s1600-h/picture458.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 238px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5370542827742862642" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTUcFJ7x1A0DRZ-cTRaDIyuOu5VMHv4jJnnjEeDv8ta3LbYdYsQULMCx9s5bRgBpr1AvZ04UfzJBibVPHpKU6woPSloC0Q6gJC2PMaCIuhjVcFFtQ07oCpVXOhMSlemwChHT0Op58iSBY/s320/picture458.JPG" /></span></a><span style="font-family:verdana;"><br /><br />The source report columns and filter:<br /><br />PRODUCTS.PROD_CATEGORY<br />CHANNELS.CHANNELS_CLASS<br />SALES.QUANTITY_SOLD<br />PRODUCTS.PROD_CATEGORY is prompted<br /><br />The target report columns and filter:<br /><br />CHANN.CH_CLASS<br />PROD.PR_NAME<br />SALES.Q_SOLD<br />PROD.PR_CAT is prompted<br />CHANN.CH_CLASS is prompted<br /><br /><span style="color:#ff0000;">Note that I'm using different subject areas with different BMM logical table and column names for the source as well as for the target report.</span><br /><br />The one more important thing is the target dashboard prompt in which we'll pass parameters:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEib0DfMsLgNJQ7jg0aRRkJ5ao6r-P2MXANvdRPsNges8OLoNvIEjLh77betbrjlm2GGCV7QhYRs6ikiZbo1IE6Zl0jclgWvNFbabj1BKS-8VdHISiJZ4kcz8hcCfCeB72XsTHayuy4JTPc/s1600-h/picture459.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 216px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5370546899459238338" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEib0DfMsLgNJQ7jg0aRRkJ5ao6r-P2MXANvdRPsNges8OLoNvIEjLh77betbrjlm2GGCV7QhYRs6ikiZbo1IE6Zl0jclgWvNFbabj1BKS-8VdHISiJZ4kcz8hcCfCeB72XsTHayuy4JTPc/s320/picture459.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Let's go back to the source report.<br /><br />I realy tried all options to call dashboard page on the different dashboard but with no luck, the only solution that works fine I'll explain later, but now let's see what have I try in the source report.<br /><br /><strong>Solutions that don't work well</strong><br /><br />PortalPageNav javascript function to call target dashboard with target dashboard page in the column PRODUCTS.PROD_CATEGORY custom text format (data format tab on the column properties):<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjK12bRe12D0qJPD399gbpVPnHXD9RX4Nmro-g48bmT7UI2GkHIH2MglaUtVSTOKemjk_1ocULUafwAiccRKoIIqFyHehqfkz3gCNWa1vVdG3zymagP6KLQbL4dcz26WAi_kKykPUOmOgw/s1600-h/picture460.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 196px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5370548982287910642" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjK12bRe12D0qJPD399gbpVPnHXD9RX4Nmro-g48bmT7UI2GkHIH2MglaUtVSTOKemjk_1ocULUafwAiccRKoIIqFyHehqfkz3gCNWa1vVdG3zymagP6KLQbL4dcz26WAi_kKykPUOmOgw/s320/picture460.JPG" /></span></a><span style="font-family:verdana;"><br /><br />But with this we can use only current column value (PRODUCTS.PROD_CATEGORY, referencing it with @) and we want to pass CHANNELS.CHANNEL_CLASS, so this solution is not good.<br /><br />I tried with the second filter in PortalPageNav but we can pass only static values further, only one filter is dynamic (with @):<br /><br /><span style="color:#ff0000;">PortalPageNav(event, '/shared/Development/_portal/Development 3', 'Test Page 2','PROD','PR_CAT',"'@'", 'CHANN','CH_CLASS','Direct')</span><br /><br />The next thing that I tried is writing the similar code with thread text as HTML option, but still no progress, we can't put PRODUCTS.PROD_CATEGORY and CHANNELS.CHANNEL_CLASS columns in the PortalPageNav instead of static values.<br /><br />I tried to write Answers column in HTML form fields and call PortalPageNav to read it with document.getElementsByName or document.myform.field.value, instead of static values, but still no luck.<br /><br />And the last one attempt is using DASHBOARD URL to navigate to dashboard page on the different dashboard:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRTHRu0xhAFzS0LXbMJ83Ccyaeam7vimgRKDZSqBtHafV_72KmB7cTz3uqmG6rYAr6s1piGqD6j92JTsYkrnCTMbuOJaqagJsnuCVNQssLvu3l6UiryKB7nUmwmRC88ycD71-Ml7BoTSc/s1600-h/picture461.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 124px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5370556011410101202" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRTHRu0xhAFzS0LXbMJ83Ccyaeam7vimgRKDZSqBtHafV_72KmB7cTz3uqmG6rYAr6s1piGqD6j92JTsYkrnCTMbuOJaqagJsnuCVNQssLvu3l6UiryKB7nUmwmRC88ycD71-Ml7BoTSc/s320/picture461.JPG" /></span></a><span style="font-family:verdana;"><br /><br />No luck again, with DASHBOARD URL we can navigate between dashboard pages that are located on the same dashboard, like in the code below:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkHTmfxKcaU1ez-433d75nXfkDLCE1MWukhyphenhyphenSBu8jm7wFrLyf3iIlfXxJGMIlSTzZRF6byR2MWehhtv0-tBl5pFKc_kBA3Dvjo2R_YP6QiV1juuTauXAEGHQdm1QMz3aJv_t0BILvWnBI/s1600-h/picture462.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 129px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5370556538181709938" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkHTmfxKcaU1ez-433d75nXfkDLCE1MWukhyphenhyphenSBu8jm7wFrLyf3iIlfXxJGMIlSTzZRF6byR2MWehhtv0-tBl5pFKc_kBA3Dvjo2R_YP6QiV1juuTauXAEGHQdm1QMz3aJv_t0BILvWnBI/s320/picture462.JPG" /></span></a><span style="font-family:verdana;"><br /><br /><strong>Working solution</strong><br /><br />The only solution that works fine with passing multiple filters (dynamic) and call another dashboard page on the another dashboard is using HTML code with PortalPageNav javascript function in the narrative view of the source report.<br /><br />With this we can easily reference PRODUCTS.PROD_CATEGORY and CHANNELS.CHANNEL_CLASS columns with @1 and @2 (like in my example) and passing parameters to the target dashboard prompt fields on the target dashboard page, target dashboard.<br /><br />HTML code with PortalPageNav function in the source report narrative view:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPxVQKnbjVK46Y743M4tGE9xZQXZL2NIZ3bGH8pmvJNI0kuJCljUOfZnO5cf5uGxzGgf3TgHj-k1vBKVGrnbBgAHvL4jm4Dt4jzlSBrSLWLFL2dEdc1lfjhtB7ZLV-66khXUdbM2c7Evc/s1600-h/picture463.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 132px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5370559254764915666" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPxVQKnbjVK46Y743M4tGE9xZQXZL2NIZ3bGH8pmvJNI0kuJCljUOfZnO5cf5uGxzGgf3TgHj-k1vBKVGrnbBgAHvL4jm4Dt4jzlSBrSLWLFL2dEdc1lfjhtB7ZLV-66khXUdbM2c7Evc/s320/picture463.JPG" /></span></a><span style="font-family:verdana;"><br /><br /><span style="color:#ff0000;"><--a href class="Nav" onclick="JavaScript:PortalPageNav(event, '/shared/Development/_portal/Development 3', 'Test Page 2','PROD','PR_CAT', '@1', 'CHANN', 'CH_CLASS', '@2');">@1 and @2<br /><--/a></span><br /><br />We display all rows in the narrative.<br /><br /><strong>Test</strong><br /><br />The source dashboard page on the first dashboard:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgl-nac0-fzC4ZTQf13PPmQ_aaMAJpbZBhzQ2x7W3_lQX126CXksqfnXPFB78mN3-63JYIiXNcfOZp2LvbgRF-q2AKjsSyl93rljWezsckcL_ohSmsGzZvRdSgMd11zYLTOG0-C9VgzYE0/s1600-h/picture464.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 118px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5370561339081380834" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgl-nac0-fzC4ZTQf13PPmQ_aaMAJpbZBhzQ2x7W3_lQX126CXksqfnXPFB78mN3-63JYIiXNcfOZp2LvbgRF-q2AKjsSyl93rljWezsckcL_ohSmsGzZvRdSgMd11zYLTOG0-C9VgzYE0/s320/picture464.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Ok, at first sight is not pretty, but the functionality is important here. We'll navigate with Electronics as category and Direct as channel class.<br /><br />The result is new opened window with target dashboard page on the target dashboard. We successfully pass two filters to the target dashboard prompt and we see the target report:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjjxqjLbNeK78HMnfn4JmMRF-4e4NN9IVIk2Qq5rmjJPlTlFK8IfIxqxM7JsyE-HcvPMNb4p04xKR4MJwuR2by2b0pk8UEDhMGuGQ94rV4yl94t2XpX3qZhKjWsMgtVChLdpOuhR7wq90/s1600-h/picture465.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 235px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5370562553583811762" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjjxqjLbNeK78HMnfn4JmMRF-4e4NN9IVIk2Qq5rmjJPlTlFK8IfIxqxM7JsyE-HcvPMNb4p04xKR4MJwuR2by2b0pk8UEDhMGuGQ94rV4yl94t2XpX3qZhKjWsMgtVChLdpOuhR7wq90/s320/picture465.JPG" /></span></a><span style="font-family:verdana;"><br /><br />NQQuery.log for the target report:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBSX3F21bVcH0OJmYhzRzqtL9s9hMC_w9hVOmMEyVHmzxWRnZNSHAOMdyodTRDa4pZMhOncJyxT-35xMFEeUzGNcC2pOd2QWaG5zEnNot6yBjLgqWvXpT3drPY8sVcFinGNWisW0mO5FA/s1600-h/picture466.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 178px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5370563120530497138" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBSX3F21bVcH0OJmYhzRzqtL9s9hMC_w9hVOmMEyVHmzxWRnZNSHAOMdyodTRDa4pZMhOncJyxT-35xMFEeUzGNcC2pOd2QWaG5zEnNot6yBjLgqWvXpT3drPY8sVcFinGNWisW0mO5FA/s320/picture466.JPG" /></span></a><span style="font-family:verdana;"><br /><br />All parameters are transferred to the target.<br /><br />If we want to navigate to the second dashboard and open it in the same window we use target="_self":<br /><br /><span style="color:#ff0000;"><--a href class="Nav" onclick="JavaScript:PortalPageNav(event, '/shared/Development/_portal/Development 3', 'Test Page 2','PROD','PR_CAT', '@1', 'CHANN', 'CH_CLASS', '@2');" target="_self">@1 and @<br /><--/a></span></span>Goran Ockohttp://www.blogger.com/profile/16571461599213456839noreply@blogger.com2tag:blogger.com,1999:blog-196729317318279460.post-20582167987336790142009-08-14T18:58:00.000+02:002009-08-14T19:59:25.878+02:00Dashboard URL navigation from source to target dashboard page and unicode replacement<span style="font-family:verdana;">This post is translated from Croatian, from one of my previous posts. For navigation between reports we use GO URL, but for navigation between dashboard pages we use DASHBOARD URL. Basic documentation about this can be found in the presentation services administration guide <a href="http://download.oracle.com/docs/cd/E10415_01/doc/bi.1013/b31766.pdf">http://download.oracle.com/docs/cd/E10415_01/doc/bi.1013/b31766.pdf</a> on the page 210 (referencing dashboard content in external portals or applications using<br />the oracle BI presentation services DASHBOARD URL. I'll not explain basic syntax how to use DASHBOARD URL. This can be found in documentation or other blogs.<br /><br />Example (with unicode replacement):<br /><br /><span style="color:#ff0000;">I will explain dashboard url navigation between two pages on the same dashboard.</span> Dashboard pages, columns, etc, are based on Croatian terminology, so I will try to translate it, although it's not so important, the technique is.<br /><br />So, there are two dashboard pages on Development dashboard, revenues, which give us some measure for products from the fact table and the second is šifarnik proizvoda which give us some detailed information about products, in this case only product group is shown in the detail part.<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhI-iwoezv9EboxtCni4QeS9kHdjt_Lk3IhPumpa1pw7sG6UtP-PkKh0zXgMJNkujp4h1I2Apo7IGLrNSq9h-wqckyki99HVuesaBigI6eTFOcJaJQnWW71kjf2_ti5Z6PKsifcfFqUHFI/s1600-h/picture7.JPG"><span style="font-family:verdana;"><img style="CURSOR: hand" id="BLOGGER_PHOTO_ID_5226914848918565106" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhI-iwoezv9EboxtCni4QeS9kHdjt_Lk3IhPumpa1pw7sG6UtP-PkKh0zXgMJNkujp4h1I2Apo7IGLrNSq9h-wqckyki99HVuesaBigI6eTFOcJaJQnWW71kjf2_ti5Z6PKsifcfFqUHFI/s400/picture7.JPG" /></span></a><span style="font-family:verdana;"><br /><br />I'll explain reports on each dashboard pages later.<br /><br />The basic idea on the first page is that the user enters some value on the dashboard prompt field and we need to give a possibility to enter the code or the product name. Also, the user want to use LIKE condition it the report.<br /><br />This is the dashboard prompt in the first page (the name of the field is 5):<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5oVhYNtH3ca0O4O8YmFERXKS9VteFFJL9ZeJhrj_FMHI3NtoKpQt941YOaMqhCaW80N0EWbLxtHxai6fxZCNW1kfN1X6tWYXlur0gLjkAeYMrfL5os5fjIDE0vwnenCc5_2XCYwUZdoo/s1600-h/picture8.JPG"><span style="font-family:verdana;"><img style="CURSOR: hand" id="BLOGGER_PHOTO_ID_5226926584737452450" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5oVhYNtH3ca0O4O8YmFERXKS9VteFFJL9ZeJhrj_FMHI3NtoKpQt941YOaMqhCaW80N0EWbLxtHxai6fxZCNW1kfN1X6tWYXlur0gLjkAeYMrfL5os5fjIDE0vwnenCc5_2XCYwUZdoo/s400/picture8.JPG" /></span></a><span style="font-family:verdana;"><br /><br />We set here presentation variable v_ulaz_var. This is very important to set. We'll use it later in te second report in the second dashboard page to remember what user enters in this prompt when we return back from the second report on the second dashboard page to this one (first report on the first dashboard page). We want to return value that user enters, not reseting it.<br /><br />Abbreviations:<br /><br /><span style="color:#ff0000;"><strong>The first report on the first dahboard page -> FRFDP<br />The second report on the second dashboard page -> SRSDP</strong></span><br /><br />The first report on the first dashboard page (FRFDP):<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLOUz1bDb6mGYwiSYVKtLy-2Wd348hHVszs6rnvOfbalVIGvDjlU3qkS-7BRay9GWdsx_r9dGn66jYwayg2kd54KVq3d-_XSFHJnAdrEfcZM_h8PtmaaaFYqXcTBMSDUrVql3JgrOhJVU/s1600-h/picture9.JPG"><span style="font-family:verdana;"><img style="CURSOR: hand" id="BLOGGER_PHOTO_ID_5226916680555534738" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLOUz1bDb6mGYwiSYVKtLy-2Wd348hHVszs6rnvOfbalVIGvDjlU3qkS-7BRay9GWdsx_r9dGn66jYwayg2kd54KVq3d-_XSFHJnAdrEfcZM_h8PtmaaaFYqXcTBMSDUrVql3JgrOhJVU/s400/picture9.JPG" /></span></a><span style="font-family:verdana;"><br /><br />The first two columns are product name and the code, the third one is the measure and the last one is important for DASHBOARD URL navigation.<br /><br /><span style="color:#ff0000;">Note that we enter manually filter for LIKE condition in case that the user enters product name or the product code.</span><br /><br />Now, here is our next step. We want to go to the another report (SRSDP) and parse the product code from the current row column from FRFDP, and the result will be detailed information for that product (product code).<br /><br />But we need one more thing here. We want to parse the value that we set in the v_ulaz_var, which in presentation variable that we set in the first page. And we want to show it in the second report (SRSDP). So for this case we will do some tricks.<br /><br />In the second dashboard page we make a dummy dashboard prompt first:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVQzCSUg1KMlrr5Y51EzirgCyiYNY-HlEf0XUkNI6hnSIcrk4WZSa7gQ7_EBkwZkjKOX1fcYER7iOu5JToZPRpv_5Lqo5jrwveEHkVyRCV97QGdpjxK1Cf0NcgR3FbRH8wruvmAnlKtqs/s1600-h/picture10.JPG"><span style="font-family:verdana;"><img style="CURSOR: hand" id="BLOGGER_PHOTO_ID_5226917533169360930" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVQzCSUg1KMlrr5Y51EzirgCyiYNY-HlEf0XUkNI6hnSIcrk4WZSa7gQ7_EBkwZkjKOX1fcYER7iOu5JToZPRpv_5Lqo5jrwveEHkVyRCV97QGdpjxK1Cf0NcgR3FbRH8wruvmAnlKtqs/s400/picture10.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Inside it we can parse what ever we want to from the first dashboard page (current row column report values, constants, presentation variables from dashboard prompts from the first page, etc). In every field we set new presentation variables that we can use in the SRSDP. So, this is a trick that works here. And in any case we can return any value to dashboard prompts on the first page.<br /><br /><span style="color:#ff0000;">Note that when using DASHBOARD URL you are parsing value to a dashboard prompt fields and the GO button is automatically executed and you get the report. So beware what you are putting on your dashboard page.</span><br /><br />Here are fields and presentation variables on dummy dashboard prompt:<br /><br />Field 1, presentation variable v_var1 -> we'll parse current row product code (šifra proizvoda) value from the FRFDP inside it.<br /><br />Field 2, presentation variable v_var2 -> we'll parse harcoded string 'Dva' inside it.<br /><br />Field 3, presentation variable v_var3 -> we'll parse harcoded string 'Tri' inside it.<br /><br />Field 4, presentation variable v_var4 -> we'll parse v_ulaz_var presentation variable from the dashboard prompt from the first dashboard page inside it.<br /><br />The second report on the second dashboard page (SRSDP):<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNac6jBNFf7tw8udorveaO5Xb_Q4dk1UeGRv7dTLww9AD_TghdXrro7UWcQUh7eiQe1nRyJMAZ73vv8TmwBQ-T8V_1N7cv7DJeWA5xbTSNgN1Ie9qQrTwfIhSCFuBNfUmLysxThUByFKw/s1600-h/picture11.JPG"><span style="font-family:verdana;"><img style="CURSOR: hand" id="BLOGGER_PHOTO_ID_5226918573586953218" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNac6jBNFf7tw8udorveaO5Xb_Q4dk1UeGRv7dTLww9AD_TghdXrro7UWcQUh7eiQe1nRyJMAZ73vv8TmwBQ-T8V_1N7cv7DJeWA5xbTSNgN1Ie9qQrTwfIhSCFuBNfUmLysxThUByFKw/s400/picture11.JPG" /></span></a><span style="font-family:verdana;"><br /><br />The first two columns are product name and the code and the third is product group.<br /><br />In the column four (Varijable) we concatenate all presentation variable from the dummy dashboard prompt, to see if our navigation works fine and if all parameters are successfully transferred:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGejrJeeDGOXS0VWXDSGh65UbUBFnq_phraRD0hisykIltD5X5_tsQ6jznDTBq6xFGfsecX9-Ofy2aACeduBXVkQiksgqmnx8O983uhhSj5yFGkFOq9yFfBnl4P-zL6sYNFUpEJ1nCYOE/s1600-h/picture437.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 71px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5368710395399309330" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGejrJeeDGOXS0VWXDSGh65UbUBFnq_phraRD0hisykIltD5X5_tsQ6jznDTBq6xFGfsecX9-Ofy2aACeduBXVkQiksgqmnx8O983uhhSj5yFGkFOq9yFfBnl4P-zL6sYNFUpEJ1nCYOE/s320/picture437.JPG" /></span></a><span style="font-family:verdana;"><br /><br />The last column (Povratak) we'll explain later, because it's a part of DASHBOARD URL for returning back to the previous dashboard page and return v_var4 into v_ulaz_var.<br /><br />In this report we have a filter that is important, because we are parsing product code (Šifra proizvoda) from FRFDP to SRSDP. We are using v_var1 presentation variable in which we parse product code before:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGYoh-MJBgTQHHolP-XFxfM8cppAw4ltnRC6GhzzwgGN0Bt_Jit-YMpkZJjwywydYk601Ywb9gDoFsYAUk8puTKu8ECg8hjpu_LrqFKRHa0NsujYHqn9yiIagAKaUAXTDw-5vF2B3OkDU/s1600-h/picture438.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 106px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5368712144542183378" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGYoh-MJBgTQHHolP-XFxfM8cppAw4ltnRC6GhzzwgGN0Bt_Jit-YMpkZJjwywydYk601Ywb9gDoFsYAUk8puTKu8ECg8hjpu_LrqFKRHa0NsujYHqn9yiIagAKaUAXTDw-5vF2B3OkDU/s320/picture438.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Now, let's go to FRFDP. There is a column Go dashboard navigation in which we'll place DASHBOARD URL code to call a second dashboard page and parse parameters to a dummy dashboard prompt and according to that implicitly call the second report on the second dashboard page (SRSDP).<br /><br />Column GO dashboard navigation on FRFDP:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEpiFtUqeHYJTrbSbj0g_93j4qhbGo1lClZhbWFGE-6NTtwFSpDE9lbPzI7ten9ztZu9iCOyAHjv22ji00Ormmg5VQx4jaKuf08n2uVZesr5SzvIQYfO0s9mEXsIM-mdWh_Lla5t8lU_0/s1600-h/picture12.JPG"><span style="font-family:verdana;"><img style="CURSOR: hand" id="BLOGGER_PHOTO_ID_5226927291176979554" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEpiFtUqeHYJTrbSbj0g_93j4qhbGo1lClZhbWFGE-6NTtwFSpDE9lbPzI7ten9ztZu9iCOyAHjv22ji00Ormmg5VQx4jaKuf08n2uVZesr5SzvIQYfO0s9mEXsIM-mdWh_Lla5t8lU_0/s400/picture12.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Basic explanation:<br /><br />PortalPath=/shared/Development/_portal/Development/&Page=%u0160ifarnik%20proizvoda<br /><br />%u0160 and %20 is required because of unicode translation (Šifarnik proizvoda).<br /><br />Col1=1 -> target field on the dummy dashboard prompt on the second page is 1.<br />Val1=... -> source field from FRFDP.<br /><br />In the field 1 in the dummy dashboard prompt we are parsing product code (Šifra proizvoda).<br /><br />If the product code (šifra proizvoda) has spaces inside the data (for example, PR 01), we need to replace space ' ' first with a plus sign '+' and then the plus sign '+' replace with ASCII 2B.<br /><br />Now, let's go to again to SRSDP. There is a column Povratak in which we'll place DASHBOARD URL code to return back to the previous page without reseting dashboard prompt from it, so basicly we are returning parameter from the presentation variable v_var into field 5 in the first page dashboard prompt. In case that we don't do that, when returning back with DASHBOARD URL to first page we would get all rows in the FRFDP, and we don't want that, we want to apply what we have in the prompt in the previous state.<br /><br />Column Povratak on SRSDP:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqt7yKTKaNvp8Oi6c-5TVvN2Ya8z1o-5tXBcyr7Khb2nIpFuyUW-yYCbPj-RaRN8m7ZxMag2FM0xCBMVlr9qYrAxLO26AdqQkMGq03yG_FtGkAjCS19dFv_rGoby0TRJUKnPFzuNZLft0/s1600-h/picture13.JPG"><span style="font-family:verdana;"><img style="CURSOR: hand" id="BLOGGER_PHOTO_ID_5226932907947495698" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqt7yKTKaNvp8Oi6c-5TVvN2Ya8z1o-5tXBcyr7Khb2nIpFuyUW-yYCbPj-RaRN8m7ZxMag2FM0xCBMVlr9qYrAxLO26AdqQkMGq03yG_FtGkAjCS19dFv_rGoby0TRJUKnPFzuNZLft0/s400/picture13.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Col1=5 -> target field on the first page dashboard prompt is 5.<br />Val1=v_var4 -> the source parameter is the presentation variable v_var4 that we set in the second page dummy prompt.<br /><br />Finally, this is complete view, with both dashboard pages and sections inside them:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiiJ_AkujofRf76EWxu1jRiWiMzByPTAcLGVylE9gG8uxAFs-EBF8E_pc29y8inCL9LhKvyWweJcO7KkgTJhE13kU9TlP1VHaORw4MmC1oDh6kkw2ASDHje8MvzpCGbuc4LEqz_ZPHv0iY/s1600-h/picture439.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 124px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5368791233205075378" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiiJ_AkujofRf76EWxu1jRiWiMzByPTAcLGVylE9gG8uxAFs-EBF8E_pc29y8inCL9LhKvyWweJcO7KkgTJhE13kU9TlP1VHaORw4MmC1oDh6kkw2ASDHje8MvzpCGbuc4LEqz_ZPHv0iY/s320/picture439.JPG" /></span></a><span style="font-family:verdana;"><br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLL1HEwMohIGlH6g1SfhtETdbbF5WNN7rRGDues0vjVzVk0ua4dlEJDP9i5daeYfwJB_etg3zEjzTl7GiHhnM_BPAmZBB7lno6k0EcygCsJf_JVNRA4U5Vnisj81tAMt0jqBOkMOFqxsM/s1600-h/picture440.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 154px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5368791352746843666" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLL1HEwMohIGlH6g1SfhtETdbbF5WNN7rRGDues0vjVzVk0ua4dlEJDP9i5daeYfwJB_etg3zEjzTl7GiHhnM_BPAmZBB7lno6k0EcygCsJf_JVNRA4U5Vnisj81tAMt0jqBOkMOFqxsM/s320/picture440.JPG" /></span></a><span style="font-family:verdana;"><br /><br /><span style="color:#ff0000;">Note that in the second page we put dummy dashboard prompt on the separate section.</span><br /><br /><strong>Test</strong><br /><br />At initial, the user place the value in the first page prompt and according to that we receive the result on the first page report. We don't know whether the user enters all product code or product name or just few strings (LIKE condition), both conditions are supported in the report filter. We press GO button and get the data:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkky9KnGlwxsf15jcLyLeHLGPy27ubdMG6u9BdC7sKeYnyYxEDecYul2tigccIsNWQgZXxFmLzsswdjPDHqmjdo6gqLMM1UcyqKI-u1wcp-azagRmD7gTQWcCYhprP90fyB5qGGCEQX9Y/s1600-h/picture14.JPG"><span style="font-family:verdana;"><img style="CURSOR: hand" id="BLOGGER_PHOTO_ID_5226934285906339042" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkky9KnGlwxsf15jcLyLeHLGPy27ubdMG6u9BdC7sKeYnyYxEDecYul2tigccIsNWQgZXxFmLzsswdjPDHqmjdo6gqLMM1UcyqKI-u1wcp-azagRmD7gTQWcCYhprP90fyB5qGGCEQX9Y/s400/picture14.JPG" /></span></a><span style="font-family:verdana;"><br /><br />We see that the product name LIKE condition (Naziv proizvoda LIKE 'Trk%') is satisfied and we receive one row in the result of the first report.<br /><br />Also in the current row of the report we know the product code (Šifra proizvoda) which is hidden column (the value is PR-01, we don't see it).<br /><br />With the column GO dashboard navigation we are going to second page and forwarding already mentioned parameters.<br /><br />The result is the second page with the second report:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLDqrMWYa13c2G3zlJFgtIH7ruxZqJW19w8c2kLwzQyjGjY74tgYzuNENCd8XA035i2VyHQYbP3tnvxl-dk_a7-4TSenfN_YQI9Zd3BLs_cF4kZ76M-3f5B5vTSCFpd7Ndl_IkYMyYkvE/s1600-h/picture15.JPG"><span style="font-family:verdana;"><img style="CURSOR: hand" id="BLOGGER_PHOTO_ID_5230002635913354530" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLDqrMWYa13c2G3zlJFgtIH7ruxZqJW19w8c2kLwzQyjGjY74tgYzuNENCd8XA035i2VyHQYbP3tnvxl-dk_a7-4TSenfN_YQI9Zd3BLs_cF4kZ76M-3f5B5vTSCFpd7Ndl_IkYMyYkvE/s400/picture15.JPG" /></span></a><span style="font-family:verdana;"><br /><br /><span style="color:#ff0000;">Note that all parameters are forwarded correctly and we get the desired data in the report.</span><br /><br />We can hide dummy dashboard prompt with guided navigation applied on the section:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1TFC2YZED_M_7D2Zbti4VqQ-s6cn4dCoIa0lkGaSgCm8PgWJiq-2S4RrSk8FJYF9BNQAceIjjUJfBbIJXw459dYnIDxYHHp-vy7_e6IBUd40MHE44xxEa57CFT1zyMze8eU9F__ZtTcw/s1600-h/picture16.JPG"><span style="font-family:verdana;"><img style="CURSOR: hand" id="BLOGGER_PHOTO_ID_5226948585407046322" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1TFC2YZED_M_7D2Zbti4VqQ-s6cn4dCoIa0lkGaSgCm8PgWJiq-2S4RrSk8FJYF9BNQAceIjjUJfBbIJXw459dYnIDxYHHp-vy7_e6IBUd40MHE44xxEa57CFT1zyMze8eU9F__ZtTcw/s400/picture16.JPG" /></span></a><span style="font-family:verdana;"><br /><br />For guided navigation we use dummy report that always shows the data, so the section is always hidden in that case:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5LKaXxPnqquzaV8Ct3Q7U8w6PGftq3GPB0vSfYJF_rZN-loauxs3Vd4gS0aZFrbfJMBkRFdK0qGri26vB219lDqKlfV04wXgnUQFx-fwEgFSa6rnDZPW-04I3UEpJ_cLq8xbbUHMOBDk/s1600-h/picture17.JPG"><span style="font-family:verdana;"><img style="CURSOR: hand" id="BLOGGER_PHOTO_ID_5226941699333757154" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5LKaXxPnqquzaV8Ct3Q7U8w6PGftq3GPB0vSfYJF_rZN-loauxs3Vd4gS0aZFrbfJMBkRFdK0qGri26vB219lDqKlfV04wXgnUQFx-fwEgFSa6rnDZPW-04I3UEpJ_cLq8xbbUHMOBDk/s400/picture17.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Now, we don't see dummy prompt:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4_gp8IiLfpp2nMW0LUgh9DAUhMC4-NjPThPKMlSTKvS8gbRIoL1LZtmykQDuT4mhhj2L9t29XVBn70rc_ORLkKuX7sp6iBq_xClBWgn_iJkTZJBb-K-F4nsN4yT74XVYcJptqtYr-KPw/s1600-h/picture18.JPG"><span style="font-family:verdana;"><img style="CURSOR: hand" id="BLOGGER_PHOTO_ID_5230002867738727986" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4_gp8IiLfpp2nMW0LUgh9DAUhMC4-NjPThPKMlSTKvS8gbRIoL1LZtmykQDuT4mhhj2L9t29XVBn70rc_ORLkKuX7sp6iBq_xClBWgn_iJkTZJBb-K-F4nsN4yT74XVYcJptqtYr-KPw/s400/picture18.JPG" /></span></a><span style="font-family:verdana;"><br /><br />After we press column Povratak (string Povratak na prvi page) we are going to the fist page without reseting filter to the first report, this is previous state:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3Yn6TBknLA44GWhrSSv7aQNsfiV2WHjk1CTUPFyYkmTZtBIduzOTFqV1-aJ4mqm72u9i9afxApVbqG_VwXtw5FLt8F4N9OjIBXeJ89zQwHaz9gv593QlIRZhvLPjvMmMhqMlcKd8tgCg/s1600-h/picture19.JPG"><span style="font-family:verdana;"><img style="CURSOR: hand" id="BLOGGER_PHOTO_ID_5226943294932218754" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3Yn6TBknLA44GWhrSSv7aQNsfiV2WHjk1CTUPFyYkmTZtBIduzOTFqV1-aJ4mqm72u9i9afxApVbqG_VwXtw5FLt8F4N9OjIBXeJ89zQwHaz9gv593QlIRZhvLPjvMmMhqMlcKd8tgCg/s400/picture19.JPG" /></span></a><span style="font-family:verdana;"><br /><br /><strong>Conclusion</strong><br /><br />This is the way and example that we can parse presentation variable from the first report to the second. Each report has its own page and its own dashboard prompt. We can hide the second page and when we call it from the DASHBOARD URL on the first page report it's look like we are calling a new report, the only difference brtween GO URL (which is only for reports) and this one is that we can parse real presentation variable to the target dashboard prompt on the target page and use it in the target report which is paced in the target page.</span>Goran Ockohttp://www.blogger.com/profile/16571461599213456839noreply@blogger.com1tag:blogger.com,1999:blog-196729317318279460.post-13375234589988323062009-08-11T14:30:00.004+02:002009-11-17T15:29:04.929+01:00Dynamic dashboard prompts and columns used in multifunctional report, full guided navigation<span style="font-family:verdana;">Example:<br /><br />Three dashboard prompts. One is showing only days or months selection and after pressing GO button we are showing second section with day values in dashboard prompt or third section with month values in dashboard prompt. The second and third sections are guided navigated and we only show one section depends on what user selects from the first dashboard prompt (first section), days or months. After we select value from the second dashboard prompt we get our report. The report is only one, with dynamic column in the group by part, depends on what user selects. For this example I used guided navigation applied on sections. I'll explain it in detail.<br /><br />The first dashboard prompt applied on the first section:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEht9H6lKMjdxgS6_OV_JSPsG3Cil3qxD99N4zQT47mrTQcLDtM6NYesT6sTBRLBW2hPsRF2O4mnqbZ-kBCCn_9Ac2UtWVmuAxpRd1vCnJNdXLHSh5YYnQA3GLk_h7OmTrGJyVjhlsN3L30/s1600-h/picture412.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 99px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5368299955037638802" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEht9H6lKMjdxgS6_OV_JSPsG3Cil3qxD99N4zQT47mrTQcLDtM6NYesT6sTBRLBW2hPsRF2O4mnqbZ-kBCCn_9Ac2UtWVmuAxpRd1vCnJNdXLHSh5YYnQA3GLk_h7OmTrGJyVjhlsN3L30/s320/picture412.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Show/SQL Results:<br /><br />SELECT case when 1=2 then TIMES.CALENDAR_MONTH_DESC<br />else 'Day'<br />end FROM "Normal model"<br />union all<br />SELECT case when 1=2 then TIMES.CALENDAR_MONTH_DESC<br />else 'Month'<br />end FROM "Normal model"<br /><br />First section:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKPh2vZQYFuqXr7M8_Ew7hY198CpDEn61mAUHHWCFYSTsMeebjYcTIKLyIzgpIIWQEUKefR9ynnHX9UDKNehHOEqhS2qYV6RNHFjvE9FzjMKSfg_Ce9NlmFA30PmxnZ9Pi0sIViv1ABIQ/s1600-h/picture413.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 77px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5368303069617100258" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKPh2vZQYFuqXr7M8_Ew7hY198CpDEn61mAUHHWCFYSTsMeebjYcTIKLyIzgpIIWQEUKefR9ynnHX9UDKNehHOEqhS2qYV6RNHFjvE9FzjMKSfg_Ce9NlmFA30PmxnZ9Pi0sIViv1ABIQ/s320/picture413.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Dashboard prompt applied on the second section:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2m7fe-MCK9YrBPKuQRLzp8oqjIhKwPeUHL6_CEtipnljrwvax-OWq7S5DqDly1x4OWwImh2gvwLy-jQ-dSL70ykcKlnHoCTRipIzOJBtbn_TKWo7g3-4v1zHtxcaxw2uAAc73WiYbZtg/s1600-h/picture417.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 107px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5368307263664538050" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2m7fe-MCK9YrBPKuQRLzp8oqjIhKwPeUHL6_CEtipnljrwvax-OWq7S5DqDly1x4OWwImh2gvwLy-jQ-dSL70ykcKlnHoCTRipIzOJBtbn_TKWo7g3-4v1zHtxcaxw2uAAc73WiYbZtg/s320/picture417.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Column formula for date from:<br /><br />case when 1=2 then TIMES.TIME_ID else cast ('1.1.1900' as date) end<br /><br />Column formula for date to:<br /><br />case when 1=2 then TIMES.TIME_ID else cast ('1.1.1901' as date) end<br /><br />Second section:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSYvnOX0S7ZPHoLVCXgzPLfqqQgWw2W4GyAXgS50nalcceWdHLguecfsYhTicSjCUmIaTPRJVStZj1gqZQ2zh-j-UMBVtbYUq0usdLuxU5F0oz176NbhDz-rlk7Qw8l7JOWlpEoiG-4yY/s1600-h/picture415.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 75px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5368303968446847282" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSYvnOX0S7ZPHoLVCXgzPLfqqQgWw2W4GyAXgS50nalcceWdHLguecfsYhTicSjCUmIaTPRJVStZj1gqZQ2zh-j-UMBVtbYUq0usdLuxU5F0oz176NbhDz-rlk7Qw8l7JOWlpEoiG-4yY/s320/picture415.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Guided navigation report applied on the second section:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNhq9rCFwdC4AzoCfFyzqeGbdaeNl5G62iVxD7pH3HDDmSvQPo9C7u0Uyv7gWZ7NBh13Ib7APqT-HeRsz86wyP0q1Hht0P0M8NI1UAsyNrrGTRV2IPRN2BoMr78F-LDn2Hh0tFNF4sqvI/s1600-h/picture419.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 143px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5368312035820372978" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNhq9rCFwdC4AzoCfFyzqeGbdaeNl5G62iVxD7pH3HDDmSvQPo9C7u0Uyv7gWZ7NBh13Ib7APqT-HeRsz86wyP0q1Hht0P0M8NI1UAsyNrrGTRV2IPRN2BoMr78F-LDn2Hh0tFNF4sqvI/s320/picture419.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Column formula for pv_dyn_group_by column (we can delete it after we make filter):<br /><br />'@{pv_dyn_group_by}'<br /><br />The report will show data if the presentation variable from the first section (first dashboard prompt) pv_dyn_group_by is filled with Day harcoded value. So the second section is whowed only in this condition. TIMES.CALENDAR_YEAR is dummy column.<br /><br />Dashboard prompt applied on the third section:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZ04xN0FEASOKs3Zf5R9DMgM_K9P-82ACdIoPHVfu88PqngpWf1U_C8Kq0giuHu7gF3lM9uhTo3XUlTWhUQBxhxBmcETQRN4MLHbUXu61c6xl8eEaK_Yv_ZuuSLe3oHBH5PAjhcVRZxUU/s1600-h/picture414.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 138px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5368303616609278594" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZ04xN0FEASOKs3Zf5R9DMgM_K9P-82ACdIoPHVfu88PqngpWf1U_C8Kq0giuHu7gF3lM9uhTo3XUlTWhUQBxhxBmcETQRN4MLHbUXu61c6xl8eEaK_Yv_ZuuSLe3oHBH5PAjhcVRZxUU/s320/picture414.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Third section:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihjKj2gShWxOchA93t1wEIPDchngHNpRNjbc2WqI4MadNQbEJrf7rtwEpx1YEADUM-KHoIYxygphvyOOt_yw24DD94AOKnTluSVYI2b_myyvJyxQcFME1xoIa4gDk4u3E1eJaev9R0ebI/s1600-h/picture418.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 72px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5368307870697598146" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihjKj2gShWxOchA93t1wEIPDchngHNpRNjbc2WqI4MadNQbEJrf7rtwEpx1YEADUM-KHoIYxygphvyOOt_yw24DD94AOKnTluSVYI2b_myyvJyxQcFME1xoIa4gDk4u3E1eJaev9R0ebI/s320/picture418.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Guided navigation report applied on the third section:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPjH6D15Q5gbLUiTL9ne1JX5i1AtlI6ZORY7aiMrAOBpMyN3DOcPkEjBYDGsr847nDlYLrfO5R56Le__myi3MB4BTeALQPVdU8e6cybPmCPr0htdim5qvyVc5u2V6_GYnlTeaUj3rqEqk/s1600-h/picture416.JPG"><img style="WIDTH: 320px; HEIGHT: 142px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5369188771325175634" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPjH6D15Q5gbLUiTL9ne1JX5i1AtlI6ZORY7aiMrAOBpMyN3DOcPkEjBYDGsr847nDlYLrfO5R56Le__myi3MB4BTeALQPVdU8e6cybPmCPr0htdim5qvyVc5u2V6_GYnlTeaUj3rqEqk/s320/picture416.JPG" /></a><span style="font-family:verdana;"><br /><br />Column formula for pv_dyn_group_by column (we can delete it after we make filter):<br /><br />'@{pv_dyn_group_by}'<br /><br />The report will show data if the presentation variable from the first section (first dashboard prompt) pv_dyn_group_by is filled with Month harcoded value. So the second section is whowed only in this condition. TIMES.CALENDAR_YEAR is dummy column.<br /><br />Target report and the section four:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3Hid7wQ6hOBZdBOf1CL0lfJBFleJxP3VbY8ji8rxUvp9lr_lj_3XDkNEIlaCPR1gWWhEKVybarhiqvjWYBhrCkFGqh38Sc7RAFpgkxIPKLaL0EEbVYvKeOFLzYfCzo7rIoIgb5LBSbuQ/s1600-h/picture420.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 122px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5368314018275933362" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3Hid7wQ6hOBZdBOf1CL0lfJBFleJxP3VbY8ji8rxUvp9lr_lj_3XDkNEIlaCPR1gWWhEKVybarhiqvjWYBhrCkFGqh38Sc7RAFpgkxIPKLaL0EEbVYvKeOFLzYfCzo7rIoIgb5LBSbuQ/s320/picture420.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Column formula for dynamic group by column:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMMLcWVr3oP-F3Hy8KpYxaxTdjjz_vvIJWgdyz3qQ_OTeQb6jtlWwRUanhS0lyTbyZTp4vUbha3-kCeCQ7m1ypjKN9riY45HD-HF_tyBmNr0ZIUyjJT0oupy8NFnOoir7zSW2NZeX41uI/s1600-h/picture421.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 150px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5368314576708685810" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMMLcWVr3oP-F3Hy8KpYxaxTdjjz_vvIJWgdyz3qQ_OTeQb6jtlWwRUanhS0lyTbyZTp4vUbha3-kCeCQ7m1ypjKN9riY45HD-HF_tyBmNr0ZIUyjJT0oupy8NFnOoir7zSW2NZeX41uI/s320/picture421.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Must be same datatypes inside it.<br /><br />Filter (advanced, convert this filter to SQL option):<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfHw3-jTeDtqB_XmuJgEGwQTsMW6J0w356KVEis_RmI389pjtyVu4b6cTNb4mozc1Jdi9R4ye6nHAxE077IlG3L_9EfKmLYSREmK4wymrDcks7Uwj7Fao42s8tbqU18-BGS-c6mdG-XT8/s1600-h/picture424.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 22px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5368322127176711410" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfHw3-jTeDtqB_XmuJgEGwQTsMW6J0w356KVEis_RmI389pjtyVu4b6cTNb4mozc1Jdi9R4ye6nHAxE077IlG3L_9EfKmLYSREmK4wymrDcks7Uwj7Fao42s8tbqU18-BGS-c6mdG-XT8/s320/picture424.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Section four:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjklYBrKefJfdDXbudbcGJp5Vod-KaEez7daMpr2DlsvS296RF4ym7nGc6ktOPp0qmRUKdt-Y7YqytZBVT2_qAL2qqGKpKmzAqhsI2TJKx14UNlvODfMeuex3jgPvwTlfU9Wv_XvyMK8IM/s1600-h/picture422.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 75px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5368317527963656050" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjklYBrKefJfdDXbudbcGJp5Vod-KaEez7daMpr2DlsvS296RF4ym7nGc6ktOPp0qmRUKdt-Y7YqytZBVT2_qAL2qqGKpKmzAqhsI2TJKx14UNlvODfMeuex3jgPvwTlfU9Wv_XvyMK8IM/s320/picture422.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Guided navigation report applied on the section four:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGPunnmIUS1WO6TrKZZ6BWpjGuDXf6Qm6b0gzh2RX7zCinlpPj1XAnAf5JRDkFC9vGh8AI8fORFZrJMnGFKgHSITqoV_j9xDHVbRQfwBmAmLNgjwUokn3C3BVbMwmy1EyUCXvazBiLf-8/s1600-h/picture423.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 149px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5368320068857888034" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGPunnmIUS1WO6TrKZZ6BWpjGuDXf6Qm6b0gzh2RX7zCinlpPj1XAnAf5JRDkFC9vGh8AI8fORFZrJMnGFKgHSITqoV_j9xDHVbRQfwBmAmLNgjwUokn3C3BVbMwmy1EyUCXvazBiLf-8/s320/picture423.JPG" /></span></a><span style="font-family:verdana;"><br /><br />We need this guided navigation report that we applied on the section four because at initial we don't want to show target report, we show it only when one of the value of the presentation variable pv_dyn_group_by is selected, and that is Day or Month value, from the first dashboard prompt from the first section.<br /><br />Filter (advanced, convert this filter to SQL option):<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbPnb7OdRkc95fiwWuDuq9YAlkFW_Vg53CWIFcGqtAY0X4GfRnX7UqDTXsGmkv3D2bfnecq3aNSddhDhigwV46BNOxPTVfLmur1hlOLKj3ziWqcBte2sZ9dOxJkVpWU3xxf0NKCFh-Ei0/s1600-h/picture425.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 21px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5368322941006797362" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbPnb7OdRkc95fiwWuDuq9YAlkFW_Vg53CWIFcGqtAY0X4GfRnX7UqDTXsGmkv3D2bfnecq3aNSddhDhigwV46BNOxPTVfLmur1hlOLKj3ziWqcBte2sZ9dOxJkVpWU3xxf0NKCFh-Ei0/s320/picture425.JPG" /></span></a><span style="font-family:verdana;"><br /><br />We applied guided navigation reports in the properties of the section, we do the same for the second and the third section (explained before):<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijhH1ZsGrc4WCYfGvU0YtpLcD142Rs-TGKLgG04yI_yKWJ6NB9JkVqQBzUHkj53fI5ZTuPjfAjcEna663CTkRD1ewHJ2cmqyxMlkCUuPqslWuhMndgeQMhDql91VSZBHSAXS091FTip6A/s1600-h/picture426.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 122px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5368323873853579010" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijhH1ZsGrc4WCYfGvU0YtpLcD142Rs-TGKLgG04yI_yKWJ6NB9JkVqQBzUHkj53fI5ZTuPjfAjcEna663CTkRD1ewHJ2cmqyxMlkCUuPqslWuhMndgeQMhDql91VSZBHSAXS091FTip6A/s320/picture426.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Finally, this is complete view, with all sections:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVeu5EzU_8YjUoYcOIj9iulrdZitLnja6m4Eh4TkPtNj4lzsh8fKLTQQXBEyrLR9n8Y-gkbCmOaQBR2DxXUi3tFQaCCOEiOJM4ErtiWoEzv_zeMyam0XR4htA4Tago0L_40Ft60t_jX64/s1600-h/picture427.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 305px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5368324518687028898" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVeu5EzU_8YjUoYcOIj9iulrdZitLnja6m4Eh4TkPtNj4lzsh8fKLTQQXBEyrLR9n8Y-gkbCmOaQBR2DxXUi3tFQaCCOEiOJM4ErtiWoEzv_zeMyam0XR4htA4Tago0L_40Ft60t_jX64/s320/picture427.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Now, we are going to test this solution.<br /><br /><strong>Test</strong><br /><br />Initial:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTKf331O69BWW7XmCwMyIbCAgwO0CNhABn_Do1M11TDUp6aBrgsT04W_ViLQxHGJnEwSFYBrhYBRMy2r8RISlREJlVgfQyfPxUMxgDO8QKqxKpf6DdsX52rs2LwUUKumjQvtxOI_T_hME/s1600-h/picture428.JPG"><span style="font-family:verdana;"><img style="WIDTH: 269px; HEIGHT: 96px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5368325066913540898" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTKf331O69BWW7XmCwMyIbCAgwO0CNhABn_Do1M11TDUp6aBrgsT04W_ViLQxHGJnEwSFYBrhYBRMy2r8RISlREJlVgfQyfPxUMxgDO8QKqxKpf6DdsX52rs2LwUUKumjQvtxOI_T_hME/s320/picture428.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Select Day and press the first GO button:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmsbKhIzj0z3H59YHX8TgK3BEdo1c1bUe5peN1X2utfUorg8x0B7cHZtab1BAA7jH6DkbKUFTktIdFz6vlwyEDSixaizl4JAMk0WK-9-ZU-wsMbsW77Yq_IASyzXvlPrgcGf36P0EjOi8/s1600-h/picture429.JPG"><span style="font-family:verdana;"><img style="WIDTH: 269px; HEIGHT: 96px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5368325546662866386" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmsbKhIzj0z3H59YHX8TgK3BEdo1c1bUe5peN1X2utfUorg8x0B7cHZtab1BAA7jH6DkbKUFTktIdFz6vlwyEDSixaizl4JAMk0WK-9-ZU-wsMbsW77Yq_IASyzXvlPrgcGf36P0EjOi8/s320/picture429.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Dashboard prompt with dates is shown:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgaaL95YAK_0cGkETnkMmS2gfu6WTE2F3cEnI3bIHI1C2tmMQqSrjfgY8QzJjcdR5N-QUFnZniT2_c6o-kQhduclhR3KYXTgNJWtJT7mjInw-9EKVgaJsqAbHFqYPAEMH7reTVCqNgET54/s1600-h/picture430.JPG"><span style="font-family:verdana;"><img style="WIDTH: 294px; HEIGHT: 173px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5368325982118423778" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgaaL95YAK_0cGkETnkMmS2gfu6WTE2F3cEnI3bIHI1C2tmMQqSrjfgY8QzJjcdR5N-QUFnZniT2_c6o-kQhduclhR3KYXTgNJWtJT7mjInw-9EKVgaJsqAbHFqYPAEMH7reTVCqNgET54/s320/picture430.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Choose date from and to values and press the second GO button:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjW4U4d1vqk2fz6AhSeTg4VpHUFyHfq_tbv37ribcmVfMeEpAKUYlaBZbQRI3GQSWz6OnuANwBYByTaPE32APxSnLWkT3g-aoz2V7bSHXUlTRySOHgMAbj87k24-kIPMMvzU3xo2GUbKVU/s1600-h/picture431.JPG"><span style="font-family:verdana;"><img style="WIDTH: 286px; HEIGHT: 169px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5368327496560379442" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjW4U4d1vqk2fz6AhSeTg4VpHUFyHfq_tbv37ribcmVfMeEpAKUYlaBZbQRI3GQSWz6OnuANwBYByTaPE32APxSnLWkT3g-aoz2V7bSHXUlTRySOHgMAbj87k24-kIPMMvzU3xo2GUbKVU/s320/picture431.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Target report for this case:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3MJKT0yQtwySkkD_Ye1kJ7Y7PgaBwa-ukP_azMC4brARsEjmMcYk-uRw5WMndtuIB2KEWbY7NrUN2AvbkaF5tG7gPkvvdFKljLStGDxYywEug0_blRfSFxsI1G9DIxeeIQvkdykg4J14/s1600-h/picture432.JPG"><span style="font-family:verdana;"><img style="WIDTH: 230px; HEIGHT: 320px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5368328633553212946" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3MJKT0yQtwySkkD_Ye1kJ7Y7PgaBwa-ukP_azMC4brARsEjmMcYk-uRw5WMndtuIB2KEWbY7NrUN2AvbkaF5tG7gPkvvdFKljLStGDxYywEug0_blRfSFxsI1G9DIxeeIQvkdykg4J14/s320/picture432.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Now, change the value to Month and press the first GO button again:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFljTNzljW_M7K9i3d8zrYYmzibWJeY5BL86zp7NazNE5aoWGZRiGP21o9emLAEaSre0PLTHGCufB6AnZkO32GwrHXUYIDDj6b-MlzG_ZLRX6E_2fmbShj7Uny1TN6F8YPJXyxHqTsZMA/s1600-h/picture433.JPG"><span style="font-family:verdana;"><img style="WIDTH: 269px; HEIGHT: 93px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5368329937419403186" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFljTNzljW_M7K9i3d8zrYYmzibWJeY5BL86zp7NazNE5aoWGZRiGP21o9emLAEaSre0PLTHGCufB6AnZkO32GwrHXUYIDDj6b-MlzG_ZLRX6E_2fmbShj7Uny1TN6F8YPJXyxHqTsZMA/s320/picture433.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Dashboard prompt with months is shown:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtEXc6il2RmZisz5jDx3wAkOUR_-5bftLBva8dFOy3m3aRoQjUwdeSMFPlxkduBZRTLKn4UVDKdhtx83ZWiEYoJ-CpY2mrHctOEd4HqgPluFM0SQfJgdyhuMhGac7hE1VtqbK8jyHPPjw/s1600-h/picture434.JPG"><span style="font-family:verdana;"><img style="WIDTH: 269px; HEIGHT: 169px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5368330358828462370" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtEXc6il2RmZisz5jDx3wAkOUR_-5bftLBva8dFOy3m3aRoQjUwdeSMFPlxkduBZRTLKn4UVDKdhtx83ZWiEYoJ-CpY2mrHctOEd4HqgPluFM0SQfJgdyhuMhGac7hE1VtqbK8jyHPPjw/s320/picture434.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Choose month from and to values and press the second GO button:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhuTlpeJu9sRF6qV8vYnLbywNCeIZObwYziO3-QHejjifTUkUvp8_aGYEiJdmKZHDyesGrWEAJnSRD3yO0aM3kkZ6yqdYQVnr7nspwojg2qlhhTDNQz14wVzJtEmwv3V1eZ3Zj3RhQWqyw/s1600-h/picture435.JPG"><span style="font-family:verdana;"><img style="WIDTH: 269px; HEIGHT: 174px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5368334574449353650" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhuTlpeJu9sRF6qV8vYnLbywNCeIZObwYziO3-QHejjifTUkUvp8_aGYEiJdmKZHDyesGrWEAJnSRD3yO0aM3kkZ6yqdYQVnr7nspwojg2qlhhTDNQz14wVzJtEmwv3V1eZ3Zj3RhQWqyw/s320/picture435.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Target report for this case:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNHNiTeYpX_07JRzc5DfZuDrH9uDh9OdDSzmyPM2fC-Tu2JbeK7sRQO_ewrKzv6CVY-AKAl8-_iyMEwsi8xRvYvNVSwNHJIhndmY8mOvcR2lNNikKQlkm9UJYx78wwImS3J8sRSqkV9jU/s1600-h/picture436.JPG"><span style="font-family:verdana;"><img style="WIDTH: 298px; HEIGHT: 320px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5368334984233787874" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNHNiTeYpX_07JRzc5DfZuDrH9uDh9OdDSzmyPM2fC-Tu2JbeK7sRQO_ewrKzv6CVY-AKAl8-_iyMEwsi8xRvYvNVSwNHJIhndmY8mOvcR2lNNikKQlkm9UJYx78wwImS3J8sRSqkV9jU/s320/picture436.JPG" /></span></a>Goran Ockohttp://www.blogger.com/profile/16571461599213456839noreply@blogger.com1tag:blogger.com,1999:blog-196729317318279460.post-14303127322338986472009-08-09T19:17:00.004+02:002009-08-11T21:53:57.116+02:00GO URL request navigation and unicode replacement<span style="font-family:verdana;">This post is translated from Croatian, from one of my previous posts. There are many sources of information and questions on OTN forum on how to use GO URL in OBIEE like this one <a href="http://forums.oracle.com/forums/thread.jspa?messageID=3595832">http://forums.oracle.com/forums/thread.jspa?messageID=3595832</a> and the basic documentation about this can be found in the presentation services administration guide <a href="http://download.oracle.com/docs/cd/E10415_01/doc/bi.1013/b31766.pdf">http://download.oracle.com/docs/cd/E10415_01/doc/bi.1013/b31766.pdf</a>. I will not explain here what is the basic syntax. I'll explain how to replace some characters with unicode codes.<br /><br />There is a two different type of navigation to a new request. One is option value interaction = navigate, on the column properties:</span><br /><span style="font-family:Verdana;"></span><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgdc39B68lC1kH4I6JFtr8bkfwmBUP8LyJLbu3Z9UzVXJAb8O4wrNFdr4JGkaOgt2nQNo-AcFh0jCRZfIGVWcppuSl8PYMHzapXEHV1RLsMMqzf8PKVia5zhHKi4koK-AkTovIjV3p1nw/s1600-h/picture6.JPG"><span style="font-family:verdana;"><img style="CURSOR: hand" id="BLOGGER_PHOTO_ID_5224815562820243826" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgdc39B68lC1kH4I6JFtr8bkfwmBUP8LyJLbu3Z9UzVXJAb8O4wrNFdr4JGkaOgt2nQNo-AcFh0jCRZfIGVWcppuSl8PYMHzapXEHV1RLsMMqzf8PKVia5zhHKi4koK-AkTovIjV3p1nw/s400/picture6.JPG" /></span></a><span style="font-family:verdana;"><br /></span><br /><span style="font-family:verdana;">The second, advanced option is to using GO URL. </span><span style="font-family:verdana;"><br /></span><br /><span style="font-family:verdana;">If we have characters in the column names in the presentation area that are not standard in the ASCII (they are non-ASCII strings) (see <a href="http://www.asciitable.com/">http://www.asciitable.com/</a>) for them we used corresponding UNICODE conversion <a href="http://rishida.net/scripts/uniview/conversion">http://rishida.net/scripts/uniview/conversion</a>, for example Croatian character š is non-ASCII string and has to be replaced with UNICODE.</span><span style="font-family:verdana;"><br /></span><br /><span style="font-family:verdana;">In our case we are using one report to another combination and parsing current row column value from the source report to the target report filter.</span><span style="font-family:verdana;"><br /></span><br /><span style="font-family:verdana;">We can use Oracle database functions for ASCII and UNICODE codes:</span><span style="font-family:verdana;"><br /></span><br /><span style="font-family:verdana;">select dump('š', 1016) from dual--hexadecimal: c5a1<br />select ASCIISTR('š') from dual--unicode: \0161<br />select to_number('c5a1', 'XXXX') from dual--hexadecimal to decimal: 50593<br />select chr(50593) from dual--decimal to ascii: š</span><span style="font-family:verdana;"><br /></span><br /><span style="font-family:verdana;">The source report:</span><span style="font-family:verdana;"><br /></span><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDE6L4HqpDINwNvTs7Ilm0sE6xurAXyEPcPW8bYb96Fl-vN8WW7XoUVlH2YV2Al_2ZDr1NHbsHzN8PjnFQLzMkJTA2ITsazcafSWwnmCovYjE7UPVtbnIrNI4RzfIhAVOpgbiXkIC7OeY/s1600-h/picture1.JPG"><span style="font-family:verdana;"><img style="CURSOR: hand" id="BLOGGER_PHOTO_ID_5224812175521557634" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDE6L4HqpDINwNvTs7Ilm0sE6xurAXyEPcPW8bYb96Fl-vN8WW7XoUVlH2YV2Al_2ZDr1NHbsHzN8PjnFQLzMkJTA2ITsazcafSWwnmCovYjE7UPVtbnIrNI4RzfIhAVOpgbiXkIC7OeY/s400/picture1.JPG" /></span></a><span style="font-family:verdana;"><br /></span><br /><span style="font-family:verdana;">The target report:</span><span style="font-family:verdana;"><br /></span><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2W7Fh9TfSw76a9FsF9oyQx4ljSfanHILRVMQe02o4uzoU-C7G6UNGo57qfL3MFfW0V8h6jtaAbRTbhT6IVYJpLOLwkmnecBr1jb7Kl-hOhhZ74XLnOS0iFh_3HTyCX_T4gT9QFQS3XYQ/s1600-h/picture5.JPG"><span style="font-family:verdana;"><img style="CURSOR: hand" id="BLOGGER_PHOTO_ID_5224812454809577714" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2W7Fh9TfSw76a9FsF9oyQx4ljSfanHILRVMQe02o4uzoU-C7G6UNGo57qfL3MFfW0V8h6jtaAbRTbhT6IVYJpLOLwkmnecBr1jb7Kl-hOhhZ74XLnOS0iFh_3HTyCX_T4gT9QFQS3XYQ/s400/picture5.JPG" /></span></a><span style="font-family:verdana;"><br /></span><br /><span style="font-family:verdana;">GO URL on the source report:</span><span style="font-family:verdana;"><br /></span><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgt1cf5Ei7I4OcjX0AfHUnEPvrIDRUpOZMxuezWUzdVkE6FjDjEBOdka3WDd3CLTOtKGN60v1CAxcppkYhkJT0p2czyR10_yPLuDh5bsMKXjlUp457xdbnpqjNIdv9F1DtvKetVfzvKarY/s1600-h/picture2.JPG"><span style="font-family:verdana;"><img style="CURSOR: hand" id="BLOGGER_PHOTO_ID_5224328198519292162" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgt1cf5Ei7I4OcjX0AfHUnEPvrIDRUpOZMxuezWUzdVkE6FjDjEBOdka3WDd3CLTOtKGN60v1CAxcppkYhkJT0p2czyR10_yPLuDh5bsMKXjlUp457xdbnpqjNIdv9F1DtvKetVfzvKarY/s320/picture2.JPG" /></span></a><span style="font-family:verdana;"><br /></span><br /><span style="font-family:verdana;">This is required to set before:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbmdQ7PdSz4jUtAbg2buhlfq0TNof4691SLvWGIYME0mc9724fviNi86muO8z-Q8dtbQ-FXDiODF_Ot9p7EmtXRJlaHsFEd1jBRF7UwBFoPi6Ac9lPg6X7MZVWd8Ly3Yf5EzfHrei2oKE/s1600-h/picture4.JPG"><span style="font-family:verdana;"><img style="CURSOR: hand" id="BLOGGER_PHOTO_ID_5224808639377049186" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbmdQ7PdSz4jUtAbg2buhlfq0TNof4691SLvWGIYME0mc9724fviNi86muO8z-Q8dtbQ-FXDiODF_Ot9p7EmtXRJlaHsFEd1jBRF7UwBFoPi6Ac9lPg6X7MZVWd8Ly3Yf5EzfHrei2oKE/s320/picture4.JPG" width="320" height="176" /></span></a><span style="font-family:verdana;"><br /></span><br /><span style="font-family:verdana;">P2 is the target request column and P3 is the source request column.</span><span style="font-family:verdana;"><br /></span><br /><span style="font-family:verdana;">P2 (target) -> Proizvod."%u0160ifra%20proizvoda<br />P3 (source) -> REPLACE(Proizvod."Šifra proizvoda", ' ', '%20')</span><span style="font-family:verdana;"><br /><br /><span style="color:#ff0000;">*Note that Šis replaced with %u0160 unicode and space with %20 only in the target column. This is related only to a presentation column name. For the source column name we leaved Šand spaces (Proizvod."Šifra proizvoda") and replace space in data inside it (with %20).</span><br /><br /></span><span style="font-family:verdana;"><span style="color:#ff0000;">Inside P3 (source) it's necessary to replace space with %20, because if there is a space in the data (for example PR 0107) without replacing it with corresponding UNICOD or hexadecimal codes we woudle get only first string (PR) and the second (0107) is cutted.</span><br /><br /><span style="color:#ff0000;">For example, for spaces we use:<br /><br />select dump(' ', 1016) from dual--hexadecimal: 20<br /><br />or</span><br /><br /><a href="http://rishida.net/scripts/uniview/conversion"><span style="color:#ff0000;">http://rishida.net/scripts/uniview/conversion</span></a><br /><br />If we notice that some of characters are not properly transferred we need to replace them all as well, for example > character should be replaced with REPLACE(Proizvod."Šifra proizvoda", '>', '%3E'), because:<br /><br />select dump('>', 1016) from dual--hexadecimal: 3e<br /><br />P3 (source) can be any presentation column, constant, session or repository variable. In our example it is presentation column Proizvod.Šifra proizvoda.<br /><br />Now if we use for example static repository variable P3 -> VALUEOF("v_sifra") as a source parameter from the source report instead of presentation column we would have GO URL like this:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfroaAwQ83LhVzlsJh-xP6E7Gf3MYIYhdxBtpAiq52MoYdrpVIEvQfrFOfBUCfQXq6PF888BhH6UNqXrk2uo8EGFBw16qOnMPZEqTBfqOxyoBRQOZlRCPadn6lH8FogwdtQT_ffrj4MwY/s1600-h/picture3.JPG"><span style="font-family:verdana;"><img style="CURSOR: hand" id="BLOGGER_PHOTO_ID_5224808580416959794" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfroaAwQ83LhVzlsJh-xP6E7Gf3MYIYhdxBtpAiq52MoYdrpVIEvQfrFOfBUCfQXq6PF888BhH6UNqXrk2uo8EGFBw16qOnMPZEqTBfqOxyoBRQOZlRCPadn6lH8FogwdtQT_ffrj4MwY/s320/picture3.JPG" /></span></a>Goran Ockohttp://www.blogger.com/profile/16571461599213456839noreply@blogger.com2tag:blogger.com,1999:blog-196729317318279460.post-75978435378294201542009-08-07T10:30:00.000+02:002009-08-07T10:33:47.195+02:00Joining two fact tables with different dimensions into single logical table<span style="font-family:verdana;">Often question on OTN forum is that if we have two fact tables and they are sharing some dimensions and some dimensions are not shared how we can show data for all dimensions. For example if we have F1 (D1, D2 and D3), and F2 (D1 and D2 and D4) and user choose F1 F2 D1 D2 D3 D4 he need to get data for F1 that matchs only for D1-D2-D3 and data for F2 that matchs only D1-D2-D4, all that in one row, so D3 and D4 are not common dimensions.<br /><br />How we can achieve this in BMM model in one logical fact table?<br /><br />Fist, we make in our repository table SALES_TIME_CHANNELS that has only TIMES and CHANNELS dimensions and SALES that has only PRODUCTS and TIMES. So, the only common dimension here is TIMES.<br /><br />Physical diagram:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0msJtEJlTPNSOU99eiZPwr8J6ZE1dC-viFpKq4bEmoLFIggrwIM3LkHg8w7SX-OdQzQENFTh-qbk8v2FYPehTaPzaB4dVMORqehNb-KgQqY92sgeCbShSGNDFw6ebsTGTfcVteJhTeZc/s1600-h/picture380.JPG"><span style="font-family:verdana;"><img style="WIDTH: 109px; HEIGHT: 320px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5355273616282957714" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0msJtEJlTPNSOU99eiZPwr8J6ZE1dC-viFpKq4bEmoLFIggrwIM3LkHg8w7SX-OdQzQENFTh-qbk8v2FYPehTaPzaB4dVMORqehNb-KgQqY92sgeCbShSGNDFw6ebsTGTfcVteJhTeZc/s320/picture380.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Source select for SALES_TIME_CHANNELS:<br /><br />select (amount_sold-100) as amount1, time_id, channel_id from sales<br /><br />BMM:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRkGwNFdziRB3UJSSFt0rP3u1_KrvmkmG1bbJSmqhROn9sWL6xiKhOpxyB1zOkp_Hn1ERPeI_FeVoLZV0Aza19Zvfe5WA5jRORgHlKMt1T39xdWmBF60wCt8spBOBD9pEcGA10tLqpBqU/s1600-h/picture381.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 165px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5355275194860236082" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRkGwNFdziRB3UJSSFt0rP3u1_KrvmkmG1bbJSmqhROn9sWL6xiKhOpxyB1zOkp_Hn1ERPeI_FeVoLZV0Aza19Zvfe5WA5jRORgHlKMt1T39xdWmBF60wCt8spBOBD9pEcGA10tLqpBqU/s320/picture381.JPG" /></span></a><span style="font-family:verdana;"><br /><br />We make complex joins for all dimensions to our fact LT:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaJdjmfqrYWPrAXQ8xKRbXWMqx7WwnpdhpQMPX3jIRXKXeHrDVQadnrlmT2wAAQ14hn4LWggLoA_wsxQYMsccqSdnQDbj8fgbTQOhFmeQDD3-yzIHG93o2-UkOU2_jUylgJDgqlA5bW48/s1600-h/picture382.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 196px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5355275670408546882" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaJdjmfqrYWPrAXQ8xKRbXWMqx7WwnpdhpQMPX3jIRXKXeHrDVQadnrlmT2wAAQ14hn4LWggLoA_wsxQYMsccqSdnQDbj8fgbTQOhFmeQDD3-yzIHG93o2-UkOU2_jUylgJDgqlA5bW48/s320/picture382.JPG" /></span></a><span style="font-family:verdana;"><br /><br />It is required to create dimensions for all dimension tables. Not that we have two logical table sources for SALES fact logical table. As we have 2 measure (one from SALES table, second from SALES_TIME_CHANNELS table) we need to specify aggregation level for those measures because they are not sharing some dimensions.<br /><br />Go first to QUANTITY_SOLD and put total logical level for ChannelsDim dimension. With this we exclude channels dimension for SALES table in the GROUP BY part because SALES is only aggregated by TIME and PRODUCTS dimension:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjz__pB61YZQrwYwr-ZbWspQRnrcU6riNwCgb79eLcXQC3p6Lw-p-XtN9THqUPza8g8tOSd5hKxXmRfnsnwStCYJB0tNmhk416cFcOgC0Ed0bQSlpaj6_WFjvdJpVbmYiEvMuzbj2_1RiA/s1600-h/picture383.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 127px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5355277888900510082" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjz__pB61YZQrwYwr-ZbWspQRnrcU6riNwCgb79eLcXQC3p6Lw-p-XtN9THqUPza8g8tOSd5hKxXmRfnsnwStCYJB0tNmhk416cFcOgC0Ed0bQSlpaj6_WFjvdJpVbmYiEvMuzbj2_1RiA/s320/picture383.JPG" /></span></a><span style="font-family:verdana;"><br /><br />The similar we do for amount1 column:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyIouTCXO06HheTJZIYbWHDj5h3OKQwGq9UMAFFnAcXyICMFtgI-rnaKnjJ0-pB4dnpb_F7on7-y8ihCXt251CHSPMLAeV3vcvPvIL5loNc5WS2cDdjtUUOkIy-lSn-7oWef8DS60N7ZE/s1600-h/picture384.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 131px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5355278595956722018" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyIouTCXO06HheTJZIYbWHDj5h3OKQwGq9UMAFFnAcXyICMFtgI-rnaKnjJ0-pB4dnpb_F7on7-y8ihCXt251CHSPMLAeV3vcvPvIL5loNc5WS2cDdjtUUOkIy-lSn-7oWef8DS60N7ZE/s320/picture384.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Test in Answers:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiH6-DO4XrhvlKemU9OdYZlohyphenhyphenLagu1Bztt2WGSQHcBxOhdwEeOQB1Ua0ogjN1D6zKXX5Cq4MG4B9K0L_VP6aqU1yLj5WPXo60x_DiEtBhmX7wOxI-MEpVji0Jsg36LrZ-k_ugTex3YZx4/s1600-h/picture385.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 159px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5355292999416481618" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiH6-DO4XrhvlKemU9OdYZlohyphenhyphenLagu1Bztt2WGSQHcBxOhdwEeOQB1Ua0ogjN1D6zKXX5Cq4MG4B9K0L_VP6aqU1yLj5WPXo60x_DiEtBhmX7wOxI-MEpVji0Jsg36LrZ-k_ugTex3YZx4/s320/picture385.JPG" /></span></a><span style="font-family:verdana;"><br /><br />We can see that measure amount1 is aggregated only by CALENDAR_YEAR and CHANNEL_CLASS and measure QUANTITY_SOLD is aggregated only by PROD_CATEGORY and CALENDAR_YEAR:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKMNgPIBMw1wJwGXQ5bXWM9uJKe30X7ep9VtOvhtnlfKgm2fGm1E2b-SIfwCgSLJAAJDGO_4XSeLekn6JR-HkTEAPW52AFRA-7I5_yalsPNPrp2OmEaotNlrAKzoJdW84jpsnG3oXU1F8/s1600-h/picture386.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 88px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5355294684231271570" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKMNgPIBMw1wJwGXQ5bXWM9uJKe30X7ep9VtOvhtnlfKgm2fGm1E2b-SIfwCgSLJAAJDGO_4XSeLekn6JR-HkTEAPW52AFRA-7I5_yalsPNPrp2OmEaotNlrAKzoJdW84jpsnG3oXU1F8/s320/picture386.JPG" /></span></a><span style="font-family:verdana;"><br /><br />NQQuery.log (OBIEE server generates 2 separate queries):<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUKD_cD9t17LtnUisoPaE9Kyth5w025DdCjSy-NRdM2oxdSpAvU8_ePW8_IEFFhgQJsodNjTMu2dYtd7rcgR3SGVspill_cq1Qb8STwBZKtkDMAsZXHk2w_aC3CVfoEX6V9MXeXcpMWSw/s1600-h/picture387.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 150px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5355297828677549746" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUKD_cD9t17LtnUisoPaE9Kyth5w025DdCjSy-NRdM2oxdSpAvU8_ePW8_IEFFhgQJsodNjTMu2dYtd7rcgR3SGVspill_cq1Qb8STwBZKtkDMAsZXHk2w_aC3CVfoEX6V9MXeXcpMWSw/s320/picture387.JPG" /></span></a>Goran Ockohttp://www.blogger.com/profile/16571461599213456839noreply@blogger.com1tag:blogger.com,1999:blog-196729317318279460.post-91333141441870834842009-07-27T15:50:00.000+02:002009-07-27T15:52:42.842+02:00OBIEE same dimension different value measures<span style="font-family:verdana;">I was inspired by this question on OTN forum </span><a href="http://forums.oracle.com/forums/thread.jspa?threadID=930469&tstart=15"><span style="font-family:verdana;">http://forums.oracle.com/forums/thread.jspa?threadID=930469&tstart=15</span></a><span style="font-family:verdana;"> and want to resolve this in Administrator by using one of data moddeling techniques.<br /><br />To repeat, the problem was how we can put 2 parameters to the user (month one, month two) so after selecting values from them the report need to be like this:<br /><br />Name Month1 Month2 Delta<br />Mark 6 4 -2<br />Paul 7 8 +1<br />Ken 10 2 -8<br /><br />while we have, of course, detailed data in table.<br /><br />Now, to show the solution how to resolve this in Administrator I'll use only TIMES, PRODUCTS and SALES table from SH user.<br /><br />The first step is to create aliases for TIMES table in the physical layer. Why? Because we need to have two TIMES logical tables, each one is filtered by one parameter (dashboard prompts, month one and month two). We create alias for SALES table to, to add second logical table source into SALES logical fact table in the BMM to allow OBIEE server to generate second query for second filter.<br /><br />This is our physical diagram:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhC6Zh3NqlK-_xnChRVZlFA_eMyb11DEFxdZxWDuN5O_86MK4HBLBFHl9t25r7mzpcpijM5ETrlH1eMOipvjW13j1H66vp-y8g_W2PRNvsJaOWahFuuc_2tNSahhg3-MCO3ZF-I6Gfb7Wg/s1600-h/picture391.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 254px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5360476494750392290" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhC6Zh3NqlK-_xnChRVZlFA_eMyb11DEFxdZxWDuN5O_86MK4HBLBFHl9t25r7mzpcpijM5ETrlH1eMOipvjW13j1H66vp-y8g_W2PRNvsJaOWahFuuc_2tNSahhg3-MCO3ZF-I6Gfb7Wg/s320/picture391.JPG" /></span></a><span style="font-family:verdana;"><br /><br />We add PRODUCTS table as this is required for joining these two fact tables, because we will retrieve information from both fact tables (both measures) and for group by we use only PRODUCTS attributes.<br /><br />Now, after we implement our model in the BMM with complex joins and three separate logical dimensions (TIMES, TIMES2 and PRODUCTS) and one logical fact table (SALES) we put two logical table sources inside it (SALES and SALES2) and each has own measures (AMOUNT_SOLD1 and AMOUNT_SOLD2). With this model OBIEE server will generate two queries, one is SALES-TIMES and the second is SALES2-TIMES2. Each combination is for one value from the filter (dashboard prompt, presentation variable, etc).<br /><br />Logical diagram with model:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyw7ccZ0MNe01VRVvEAZalFdWOmEFoa_v5EgEB3v623qkldNADQMfAwqXbvluuOxzHCX7y7nb9QPGapFqm6faLet2PfofAHmlLI_dx4PoNIR4QN3P73ypd-KSE57W34fp_8IZSiqwJPb8/s1600-h/picture392.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 304px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5360480005859950354" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyw7ccZ0MNe01VRVvEAZalFdWOmEFoa_v5EgEB3v623qkldNADQMfAwqXbvluuOxzHCX7y7nb9QPGapFqm6faLet2PfofAHmlLI_dx4PoNIR4QN3P73ypd-KSE57W34fp_8IZSiqwJPb8/s320/picture392.JPG" /></span></a><span style="font-family:verdana;"><br /><br />AMOUNT1_AMOUNT2_DIFF logical column:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiSJ4HaFJXmkYgiDG9-QE3DSAC3MZZTPXWYeg9ixGM6StwS71ZDlIKXiGEvoAj8Z0TCjHv29ZPzEaFYR61cbhqUwevKrjY0saD3ivqWNB2sXUNisdRt8gYULWxLUt0u_vAuzENz4lv9v0I/s1600-h/picture393.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 254px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5360481522138987458" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiSJ4HaFJXmkYgiDG9-QE3DSAC3MZZTPXWYeg9ixGM6StwS71ZDlIKXiGEvoAj8Z0TCjHv29ZPzEaFYR61cbhqUwevKrjY0saD3ivqWNB2sXUNisdRt8gYULWxLUt0u_vAuzENz4lv9v0I/s320/picture393.JPG" /></span></a><span style="font-family:verdana;"><br /><br />You can just put ABS(SALES.AMOUNT_SOLD1-SALES.AMOUNT_SOLD2).<br /><br />Add tables to the presentation area:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiik40ano_yc1JyxDs3ZVVesfaDed0mh3THc067aI16Nb1orDMmtjpqbC-Qw8xq8Xs8tFhq1KnfKrNHKg7TNl1uAu6rjAXkTOHMnFShhWXpex-xLuW8ukcCE3sZMoDgwqYwoCQMkpCRLYA/s1600-h/picture394.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 76px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5360482314805242194" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiik40ano_yc1JyxDs3ZVVesfaDed0mh3THc067aI16Nb1orDMmtjpqbC-Qw8xq8Xs8tFhq1KnfKrNHKg7TNl1uAu6rjAXkTOHMnFShhWXpex-xLuW8ukcCE3sZMoDgwqYwoCQMkpCRLYA/s320/picture394.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Make two dashboard prompts for each month. Can be with TIMES.CALENDAR_MONTH_DESC and TIMES2.CALENDAR_MONTH_DESC in the column editor and with these columns set to IS PROMPTED in the report filter.<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguPELFLt8UZhcjJt26HqJhi3Svo5M2nHjY1c_6zthHu6wp6PY3IempZ8rOgOSRUrXmKMb2IyAVAQEKBjN2C8_iNnpTdusRf3k1TClCiyEssqJZ9w4fAmC_J4qSLadeKDNcZw8e6waefbM/s1600-h/picture396.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 70px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5360488955810741490" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguPELFLt8UZhcjJt26HqJhi3Svo5M2nHjY1c_6zthHu6wp6PY3IempZ8rOgOSRUrXmKMb2IyAVAQEKBjN2C8_iNnpTdusRf3k1TClCiyEssqJZ9w4fAmC_J4qSLadeKDNcZw8e6waefbM/s320/picture396.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Or can be like this. In this case you need to use presentation variables in the report filter.<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhr_i7wr1NanHJ_w88kOUpAXWXV_w6a6E4yakknVcHYshDy2nTEjMXPl-sT_XqRkRNXqOa6U0681in_zBSmLc47RruVEbuS89o9tjB4LFL_8M_eEE3p_p4n4tfWGpSCfwiNVkjS0_EAKEQ/s1600-h/picture395.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 82px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5360490118442127842" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhr_i7wr1NanHJ_w88kOUpAXWXV_w6a6E4yakknVcHYshDy2nTEjMXPl-sT_XqRkRNXqOa6U0681in_zBSmLc47RruVEbuS89o9tjB4LFL_8M_eEE3p_p4n4tfWGpSCfwiNVkjS0_EAKEQ/s320/picture395.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Report:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-o-1Z2mO7vPGbFe90UAvOaHQ-9YyL38glGlSzmGymwNtRY_LtrlHBsPoQoujZtkSSZij-9JRupO1TjfS9jAQQYhATp-iyT6ovC8rY7p8xKtG_7pOBWZdO7yKYZCZRwU_6frKsk8jIaww/s1600-h/picture398.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 127px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5360498607857311730" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-o-1Z2mO7vPGbFe90UAvOaHQ-9YyL38glGlSzmGymwNtRY_LtrlHBsPoQoujZtkSSZij-9JRupO1TjfS9jAQQYhATp-iyT6ovC8rY7p8xKtG_7pOBWZdO7yKYZCZRwU_6frKsk8jIaww/s320/picture398.JPG" /></span></a><span style="font-family:verdana;"><br /><br />or, if you use presentation variables:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiv4Mw9nfz0FsKPwYWNQdosqzI1G5zPnFcX0dywvunh9GS_khL_SaJs8L0mgdt_mNk4t8Ty_cV5rok7ARQ-Krf0Sa5nW14Fa-d9mHq13_vvIwf6c1dGU0HOlEug21dR5046E_CKriXzjQs/s1600-h/picture397.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 115px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5360498331360545874" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiv4Mw9nfz0FsKPwYWNQdosqzI1G5zPnFcX0dywvunh9GS_khL_SaJs8L0mgdt_mNk4t8Ty_cV5rok7ARQ-Krf0Sa5nW14Fa-d9mHq13_vvIwf6c1dGU0HOlEug21dR5046E_CKriXzjQs/s320/picture397.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Result:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvPGRRuY-gcri6E6fR_vSZIZttZILtfVoKgJ8V4f2ZwA5mZlSXaeQ2O1oWQ6fMyIzDM2GXVlMN_UikTKRjgIXN1Ker_YxGhahQ1bA9twvm5X3FT60QEPEkMTvaRdNd6TRlSKc9AjKmZhc/s1600-h/picture399.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 104px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5360502006016893106" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvPGRRuY-gcri6E6fR_vSZIZttZILtfVoKgJ8V4f2ZwA5mZlSXaeQ2O1oWQ6fMyIzDM2GXVlMN_UikTKRjgIXN1Ker_YxGhahQ1bA9twvm5X3FT60QEPEkMTvaRdNd6TRlSKc9AjKmZhc/s320/picture399.JPG" /></span></a><span style="font-family:verdana;"><br /><br />NQQuery.log:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBfjTKXcrzsmocPD6bGLV8Qr4cz22mMWuKBGjTaQfOMdpqyo6HI3ZNks39vYE4qlocl6vlu3ORfM3cu273DImk8GEJUQZqMMZP6JI0rrTVkq6IrmSpYP79L6ABFDNCrPC0uHNS6gS33Vs/s1600-h/picture400.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 175px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5360507401278054290" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBfjTKXcrzsmocPD6bGLV8Qr4cz22mMWuKBGjTaQfOMdpqyo6HI3ZNks39vYE4qlocl6vlu3ORfM3cu273DImk8GEJUQZqMMZP6JI0rrTVkq6IrmSpYP79L6ABFDNCrPC0uHNS6gS33Vs/s320/picture400.JPG" /></span></a><span style="font-family:verdana;"><br /></span><br /><br /><br /><span style="font-family:verdana;"><span style="color:#ff0000;">*Note<br />If you drop PRODUCTS.PROD_CATEGORY column OBIEE cannot join these two measures no mather if you include different dimensions (TIMES, TIMES2) in the filter and we get an error: The query does not reference any tables</span><span style="color:#ff0000;">.</span><br /><br /><span style="color:#ff0000;">We could get the same report at the beginning of this post, without our new data model (TIMES-SALES and TIMES2-SALES2), with just using TIMES-SALES, and this we only aply in Answers:<br /><br />PRODUCTS:PROD_CATEGORY<br /><br />FILTER(SALES.AMOUNT_SOLD1 USING (TIMES.CALENDAR_MONTH_DESC = '@{pv_month_one}'))<br /><br />FILTER(SALES.AMOUNT_SOLD1 USING (TIMES.CALENDAR_MONTH_DESC = '@{pv_month_two}'))<br /><br />ABS<br />(<br />FILTER(SALES.AMOUNT_SOLD1 USING (TIMES.CALENDAR_MONTH_DESC = '@{pv_month_one}'))<br />-<br />FILTER(SALES.AMOUNT_SOLD1 USING (TIMES.CALENDAR_MONTH_DESC = '@{pv_month_two}'))<br />)</span><br /><br />The result is the same:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8rktUlexqsmx85Ao2OXrIHb5rIi_PKOMHbVfg24qS-NygcsKJ2PJm9NTB_mOHVlAStiDGYR7TvwXEij05PHBMG_43rCpAsqGHS29M9J4vJX8tZA89GulJQ3c0b6U_uauSz9xG5exzpfc/s1600-h/picture401.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 93px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5360518244678286082" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8rktUlexqsmx85Ao2OXrIHb5rIi_PKOMHbVfg24qS-NygcsKJ2PJm9NTB_mOHVlAStiDGYR7TvwXEij05PHBMG_43rCpAsqGHS29M9J4vJX8tZA89GulJQ3c0b6U_uauSz9xG5exzpfc/s320/picture401.JPG" /></span></a><span style="font-family:verdana;"><br /><br />The NQQuery.log is slightly different:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4BW7BC2MKnE1B8z-wNJcNhuRt47jUqvj3Pc3YHW0OLTRz86GgsGKd27YTpWVXJ8ivRKx5EaFq9sTSwF9MUEsyUJj9rwxXc1CSsiCzNEUOpiEZK-cWcmuxrZ_v-BAfQhGjBNvj3SmWaqA/s1600-h/picture402.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 118px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5360520678811978258" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4BW7BC2MKnE1B8z-wNJcNhuRt47jUqvj3Pc3YHW0OLTRz86GgsGKd27YTpWVXJ8ivRKx5EaFq9sTSwF9MUEsyUJj9rwxXc1CSsiCzNEUOpiEZK-cWcmuxrZ_v-BAfQhGjBNvj3SmWaqA/s320/picture402.JPG" /></span></a><span style="font-family:verdana;"><br /><br />FILTER USING is also a gut solution.</span>Goran Ockohttp://www.blogger.com/profile/16571461599213456839noreply@blogger.com2tag:blogger.com,1999:blog-196729317318279460.post-28954504607250102592009-07-24T09:43:00.003+02:002009-07-24T09:46:29.065+02:00OBIEE LOGLEVEL session variable problem<span style="font-family:verdana;">If you read my post </span><a href="http://108obiee.blogspot.com/2009/03/external-table-authentication-and-row.html"><span style="font-family:verdana;">External table authentication and row-wise initialization in OBIEE </span></a>, <span style="font-family:verdana;">in Part1 - External table authentication I'm using external table for authentication of the user, group, displayname and loglevel.<br /><br />I'm using b_ext_tab_auth_all block:<br /><br />select username, groupname, displayname, loglevel<br />from HR.OBIEE_EXT_TAB_AUTH<br />where username=':USER'<br />and password=':PASSWORD'<br /><br />The table OBIEE_EXT_TAB_AUTH has loglevel column number datatype in the database and when you import it to a repository it has double datatype:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNn9iAT7uqkp0-OsjMd_OmyVYadRCIcj_D1JnJCSPchBiz60y1vg6aNM9wQeBkYUVGsYmmhW4nwQAs7NhN_h-12hiOcTZ9qooD8Fo2HZkf3fKzejqLiNrXHB4Axb7fn4eQFrqYIp_xCw8/s1600-h/picture410.JPG"><span style="font-family:verdana;"><img style="WIDTH: 318px; HEIGHT: 167px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5361184333576143378" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNn9iAT7uqkp0-OsjMd_OmyVYadRCIcj_D1JnJCSPchBiz60y1vg6aNM9wQeBkYUVGsYmmhW4nwQAs7NhN_h-12hiOcTZ9qooD8Fo2HZkf3fKzejqLiNrXHB4Axb7fn4eQFrqYIp_xCw8/s320/picture410.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Logon with some user (UserC, which has loglevel 5 in the database) and make a simple request and see NQQuery.log.<br /><br />You'll see that the log in the NQQuery.log does not exist.<br /><br />Try to put first in the column in the report VALUEOF(NQ_SESSION.LOGLEVEL) to see what is populated:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgs1gRo_dSWhu8j_g4y7zQylsDo6sJ7QhGwyHnyl44gy6PdUSZh0k8DmZH_LfA7RVu4wfrsFt-58psAGLFJlnpGw5omcGUvtU1LRAb7PleEviwO_T7eMeQisZSZMzV3Yfc3BKNWeeb4D3o/s1600-h/picture411.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 36px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5361193037469205634" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgs1gRo_dSWhu8j_g4y7zQylsDo6sJ7QhGwyHnyl44gy6PdUSZh0k8DmZH_LfA7RVu4wfrsFt-58psAGLFJlnpGw5omcGUvtU1LRAb7PleEviwO_T7eMeQisZSZMzV3Yfc3BKNWeeb4D3o/s320/picture411.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Ok, this is because decimal is populated and LOGLEVEL need to have integer as input to work properly.<br /><br /><strong>Solution:</strong><br /><br />Leave datatype of imported table to DOUBLE and do a explicit TO_NUMBER(loglevel) conversion:<br /><br />select username, groupname, displayname, to_number(loglevel)<br />from HR.OBIEE_EXT_TAB_AUTH<br />where username=':USER'<br />and password=':PASSWORD'<br /><br />Now it works and you'll get log in the NQQuery.log.<br /><br /></span><span style="font-family:verdana;"><span style="color:#ff0000;">*Note<br />If you just change datatype of imported table from DOUBLE to INT and leave block without change:<br /><br />select username, groupname, displayname, loglevel<br />from HR.OBIEE_EXT_TAB_AUTH<br />where username=':USER'<br />and password=':PASSWORD'<br /><br />it does not work, you can't see logs in NQQuery.log.<br /><br />If you are using character for LOGLEVEL column in the database then you need to put TO_NUMBER(loglevel) also.</span> </span>Goran Ockohttp://www.blogger.com/profile/16571461599213456839noreply@blogger.com3tag:blogger.com,1999:blog-196729317318279460.post-1055843890154979892009-07-16T11:23:00.007+02:002011-03-02T22:46:17.721+01:00OBIEE write back, solution for insert and update in database<span style="font-family:verdana;">Here is my solution for write back (insert and update). I'm just trying to do some table data maintenance, and that is, insert and update one after the other. This solution includes two reports (one for insert and one for update, and two XML files). It's very fast to insert data, or update.<br /><br />1. At first, we create table in the database:<br /><br />create table wb_test(col1 number, col2 varchar2(50), col3 varchar2(255))<br /><br />alter table wb_test add constraint wb_test_pk primary key (col1)<br /><br />create sequence wb_test_seq start with 1 increment by 1<br /><br />2. In Administrator, we need to disable cacheable option:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi56JOxKAmr5AsTuEabBf5LoPlhV7qBPbQoDuCWW0ywNZMKgZjP_AsOwgQ3lHUC45NrYxTND8TvXbBAVnE2idHhQYOBCYunMogDHLJYnhNuRwG08C96aQoTxUPh23lMYWuh5eg2vaQZzEs/s1600-h/picture30.JPG"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5278457294617130194" style="WIDTH: 352px; CURSOR: hand; HEIGHT: 196px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi56JOxKAmr5AsTuEabBf5LoPlhV7qBPbQoDuCWW0ywNZMKgZjP_AsOwgQ3lHUC45NrYxTND8TvXbBAVnE2idHhQYOBCYunMogDHLJYnhNuRwG08C96aQoTxUPh23lMYWuh5eg2vaQZzEs/s400/picture30.JPG" border="0" /><br /><br /></span></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSt2k68zZcllWrRGYhE9S0xYbbZjqHykT9CNQPfK1Anx_5L6P2jbjKwnnNMNKm3pkVPYN2ovv4IqUibiOt_P127r7X-WYq6p5sgZIwIO7hik0Zlr2Whnke7Bqiyv8_TGWhlSWHH8KdCFU/s1600-h/picture31.JPG"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5278457291777959634" style="WIDTH: 400px; CURSOR: hand; HEIGHT: 270px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSt2k68zZcllWrRGYhE9S0xYbbZjqHykT9CNQPfK1Anx_5L6P2jbjKwnnNMNKm3pkVPYN2ovv4IqUibiOt_P127r7X-WYq6p5sgZIwIO7hik0Zlr2Whnke7Bqiyv8_TGWhlSWHH8KdCFU/s400/picture31.JPG" border="0" /></span></a><span style="font-family:verdana;"><br /><br />3. In Answers the user must have write back privilegies<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTIWmDiIV8UkaYnHv7cI7U-f6qgHQpEwkh-ewhof6cb8qb6tbi-DTMVtkhuAfetVmn3mBhs55Q3p1KwUB4xa5oBskMPg4to3iBsCRrvlC5v4iB82ggLYqt9OJK11Z78T5QSU_MphBzUgQ/s1600-h/picture32.JPG"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5278457290345499730" style="WIDTH: 400px; CURSOR: hand; HEIGHT: 310px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTIWmDiIV8UkaYnHv7cI7U-f6qgHQpEwkh-ewhof6cb8qb6tbi-DTMVtkhuAfetVmn3mBhs55Q3p1KwUB4xa5oBskMPg4to3iBsCRrvlC5v4iB82ggLYqt9OJK11Z78T5QSU_MphBzUgQ/s400/picture32.JPG" border="0" /></span></a><span style="font-family:verdana;"><br /><br />4. In this write back insert/update solution user inserts new data through the one report and through the other report is doing update. Both reports are for the same database table. Write back option is taking XML file that we put in ..\OracleBI\web\msgdb\customMessages folder. Inside this XML there are SQL's for insert and/or update.<br /><br />5. Insert report<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwoaU-MvJ9DT_j6zq9jU6FcNJ9T7mYTxSK9p2DTAy6Me0NhLiuuncYXIcHwvNBkLOL28RwfosF4mepSzbM9FnuTQuMF62N6gBzMMKEjojm_PvRN1K19I_z1286ATKupUxIgnzmTv7YmDM/s1600-h/picture33.JPG"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5278455056673817186" style="WIDTH: 400px; CURSOR: hand; HEIGHT: 160px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwoaU-MvJ9DT_j6zq9jU6FcNJ9T7mYTxSK9p2DTAy6Me0NhLiuuncYXIcHwvNBkLOL28RwfosF4mepSzbM9FnuTQuMF62N6gBzMMKEjojm_PvRN1K19I_z1286ATKupUxIgnzmTv7YmDM/s400/picture33.JPG" border="0" /></span></a><span style="font-family:verdana;"><br /><br />Here is Id=0 in the filter. What does it mean? This insert report is taking only rows that have Id=0. So, for 'insert new row' we'll update this Id from 0 to some sequence value. You'll see later that we put update statement in insert XML. This dummy row is a necessary to be in the table, before (when the table is empty) and after we update (this is resolved by a after update trigger) because the table has the primary key (id), otherwise we have problems.<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUvDYrUd9r5cTPSg-imRJXwV0zzB7H98hBhx5lrVQAkazjzZiOESubrElCiGoylNyULYNDiZTXpGrptPqvBTaOwEqlQwj0W7xejiCWoRtIE6ZgbTJ_flaIV-IrjXiePWetUMor30hpfxk/s1600-h/picture34.JPG"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5278455053410361778" style="WIDTH: 400px; CURSOR: hand; HEIGHT: 81px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUvDYrUd9r5cTPSg-imRJXwV0zzB7H98hBhx5lrVQAkazjzZiOESubrElCiGoylNyULYNDiZTXpGrptPqvBTaOwEqlQwj0W7xejiCWoRtIE6ZgbTJ_flaIV-IrjXiePWetUMor30hpfxk/s400/picture34.JPG" border="0" /></span></a><span style="font-family:verdana;"><br /><br />OBIEE has some problems with null values in the database. In this case we have 0 – null – null and we need to put in the col2 and col3 columns expression ifnull(WB_TEST.COL2,'n/a') and ifnull(WB_TEST.COL3,'n/a') to get null value from database and represents it as n/a.<br /><br />Without this workaround if we try to insert something (test) we would have:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggFidYaL-0yzDpNK6k6uXug5OUs5gZP3sYWAHm03OwBcxxpDZjmEwMYzfJ2UGp-hXYGiqY4TshVv9CRFyn6Dy_dfRdp187m1G_6QFmtDv_aQrP_rJsqrmg-QWpPu9A3A8KAp7Dr44EO00/s1600-h/picture35.JPG"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5278455051563853442" style="WIDTH: 400px; CURSOR: hand; HEIGHT: 102px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggFidYaL-0yzDpNK6k6uXug5OUs5gZP3sYWAHm03OwBcxxpDZjmEwMYzfJ2UGp-hXYGiqY4TshVv9CRFyn6Dy_dfRdp187m1G_6QFmtDv_aQrP_rJsqrmg-QWpPu9A3A8KAp7Dr44EO00/s400/picture35.JPG" border="0" /></span></a><span style="font-family:verdana;"><br /><br />and we get an error:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQzUCoBJ97_l9jgBTVBHeiCfrg4yE4Han41UjtGZJyJhYRHLAFZbrO4V2wxMoef_la5rbqeG-PcE2TzEyvOlru0PqHmnoD0SF9yXOvm-XOKAw314dI5bdo541fumNyZB_KwoyYhzRmr4M/s1600-h/picture36.JPG"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5278455050642883938" style="WIDTH: 400px; CURSOR: hand; HEIGHT: 167px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQzUCoBJ97_l9jgBTVBHeiCfrg4yE4Han41UjtGZJyJhYRHLAFZbrO4V2wxMoef_la5rbqeG-PcE2TzEyvOlru0PqHmnoD0SF9yXOvm-XOKAw314dI5bdo541fumNyZB_KwoyYhzRmr4M/s400/picture36.JPG" border="0" /></span></a><span style="font-family:verdana;"><br /><br />We can ignore/fix this error, with ifnull(WB_TEST.COL2,'n/a') in the col2 and ifnull(WB_TEST.COL3,'n/a') in the col3. Try it.<br /><br />Then we get:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYV7CSl6ehRGxjncF3JU7eVPLtHfZV3UGsOS6Xh6QGcNW5DGFoP35OTwidHhiW2Zx6J_ElMFuDiqedtE1znhgKVadpEJxdvUVEonlzCMIrpXSuWXt91UTEiS9wsl8udKDQymQISh90Oks/s1600-h/picture37.JPG"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5278455048056301410" style="WIDTH: 400px; CURSOR: hand; HEIGHT: 212px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYV7CSl6ehRGxjncF3JU7eVPLtHfZV3UGsOS6Xh6QGcNW5DGFoP35OTwidHhiW2Zx6J_ElMFuDiqedtE1znhgKVadpEJxdvUVEonlzCMIrpXSuWXt91UTEiS9wsl8udKDQymQISh90Oks/s400/picture37.JPG" border="0" /></span></a><span style="font-family:verdana;"><br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipv_thWEmjA64kkQzYAqsiIESKoI2hWFc8HtijFO9gKHQlmWkZ7JtXs7AaFxdL_GUJaGi8f61VoS6EXOgfFWvNjiIgckWkFXy3ygHf_R4F6ytsav-5oyX7n0OXbqjtKJu4U9g0GAiyudw/s1600-h/picture38.JPG"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5278454732712540354" style="WIDTH: 400px; CURSOR: hand; HEIGHT: 110px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipv_thWEmjA64kkQzYAqsiIESKoI2hWFc8HtijFO9gKHQlmWkZ7JtXs7AaFxdL_GUJaGi8f61VoS6EXOgfFWvNjiIgckWkFXy3ygHf_R4F6ytsav-5oyX7n0OXbqjtKJu4U9g0GAiyudw/s400/picture38.JPG" border="0" /></span></a><span style="font-family:verdana;"><br /><br />N/a is null, so if we delete n/a from both columns we are saving null in the database with new inserted Id, and this works fine, like in case if we put some value:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3YsZqQxO6WwWOUNVXqnxhmpvdjJPM6ohOfrL9s1ZhV-Gsvrp0wBykZth-LAQq0Po-hu-Wt8DmCoUtygVVnow2n69aj97N1L51X6YcmjJtWuzh2jon2k0zLIs5VeQFvcGKfmMxgfkMQok/s1600-h/picture39.JPG"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5278454724879695426" style="WIDTH: 400px; CURSOR: hand; HEIGHT: 112px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3YsZqQxO6WwWOUNVXqnxhmpvdjJPM6ohOfrL9s1ZhV-Gsvrp0wBykZth-LAQq0Po-hu-Wt8DmCoUtygVVnow2n69aj97N1L51X6YcmjJtWuzh2jon2k0zLIs5VeQFvcGKfmMxgfkMQok/s400/picture39.JPG" border="0" /></span></a><span style="font-family:verdana;"><br /><br />After successful insert the next thing that we see is again dummy Id=0 row. This means that OBIEE saved our insert data in the database (mmarkic) i automatically give us dummy Id=o row. If we don't want to insert we close the insert report. After the user push insert button, XML code is generated.<br /><br />Insert XML:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCmGFW82NUZjVM-nMRILogea6Q3t-tUl4e8nQTXVomUzR38TK6qK1e1TJjEBGuUQfWPMiGTbmFNQZpYXB2Y3nLKXMUwHJ_p8fhWtP24rne9PRiAf4TI32pk78AJhHS-M43uVGBjUjmJpo/s1600-h/picture135.JPG"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5293743487404934146" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 81px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCmGFW82NUZjVM-nMRILogea6Q3t-tUl4e8nQTXVomUzR38TK6qK1e1TJjEBGuUQfWPMiGTbmFNQZpYXB2Y3nLKXMUwHJ_p8fhWtP24rne9PRiAf4TI32pk78AJhHS-M43uVGBjUjmJpo/s320/picture135.JPG" border="0" /></span></a><span style="font-family:verdana;"><br /><br />After insert the state in the database is:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYTRBC4DdSAr78SBSn9BcjVlNsKi6hTECstNzJSAS6BJR13LqhWIh_yPa_sJoCRce9nAWKZCe7-XVp6lznPo_80xoBZAUGdL2h21iQ8tK__5Cr3urhCbOV-09wvumGjKz7KEJYyFSdU8E/s1600-h/picture40.JPG"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5278454725504984562" style="WIDTH: 400px; CURSOR: hand; HEIGHT: 96px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYTRBC4DdSAr78SBSn9BcjVlNsKi6hTECstNzJSAS6BJR13LqhWIh_yPa_sJoCRce9nAWKZCe7-XVp6lznPo_80xoBZAUGdL2h21iQ8tK__5Cr3urhCbOV-09wvumGjKz7KEJYyFSdU8E/s400/picture40.JPG" border="0" /></span></a><span style="font-family:verdana;"><br /><br />We see new inserted row with Id 34, and a new dummy row appeared.<br /><br />6. Update report<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgicgZJBbs8ZzHn6IOG4nwhIufcQ1fGoZz0BYmRcLaD0LvJ8bA0geA9TL08BBLI1l1fYX-k06pp3nGFXSwtwSveWxxrdhyAjGE9XoSNs_UbVq574lmpZwmg7B8vWl4ghQ1bT0w0MfH4UTs/s1600-h/picture41.JPG"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5278454721418161266" style="WIDTH: 400px; CURSOR: hand; HEIGHT: 163px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgicgZJBbs8ZzHn6IOG4nwhIufcQ1fGoZz0BYmRcLaD0LvJ8bA0geA9TL08BBLI1l1fYX-k06pp3nGFXSwtwSveWxxrdhyAjGE9XoSNs_UbVq574lmpZwmg7B8vWl4ghQ1bT0w0MfH4UTs/s400/picture41.JPG" border="0" /></span></a><span style="font-family:verdana;"><br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNQLcGCU7SCGhiBp1TBHb-JXa2U9llRGLDUKPi7mdg86t1jnxtQoPDS9rCmhTh7UUlkwmxrM_lmilf0hetfz724i1w3LUAbKjZY7EIiii3YMQk9uMOYbfVxesnxD3pFq6hoLdBbwiBkSM/s1600-h/picture42.JPG"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5278454720645468738" style="WIDTH: 400px; CURSOR: hand; HEIGHT: 216px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNQLcGCU7SCGhiBp1TBHb-JXa2U9llRGLDUKPi7mdg86t1jnxtQoPDS9rCmhTh7UUlkwmxrM_lmilf0hetfz724i1w3LUAbKjZY7EIiii3YMQk9uMOYbfVxesnxD3pFq6hoLdBbwiBkSM/s400/picture42.JPG" border="0" /></span></a><span style="font-family:verdana;"><br /><br />In this update report we show only inserted rows, with Id that is greater then zero (Id>0). We can update them. In case we don't have inserted rows this report would return no results.<br /><br />In our case we have one row to update..<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEit4T60nomzSu6OsFBQhqz3QlkMCZdZZEHO7-Ca4tCkEz-UcWAC3Ja49ttATcQxr9YSP4Yt1UtzPUrJ2Th5ZL9Is3PXjhnpyxewtqtZuzD3TFbj-kmuqeTKjg-Hn60biPmHe1lkMfMdr1g/s1600-h/picture43.JPG"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5278454302030413906" style="WIDTH: 400px; CURSOR: hand; HEIGHT: 129px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEit4T60nomzSu6OsFBQhqz3QlkMCZdZZEHO7-Ca4tCkEz-UcWAC3Ja49ttATcQxr9YSP4Yt1UtzPUrJ2Th5ZL9Is3PXjhnpyxewtqtZuzD3TFbj-kmuqeTKjg-Hn60biPmHe1lkMfMdr1g/s400/picture43.JPG" border="0" /></span></a><span style="font-family:verdana;"><br /><br />We have changed value from mmarkic u mmarkic2:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2prYPx-KXlr_WKDK9nzBMmGeLZP1hroNvlujkAwh_Y93u32_c17EEceXox2X-zTHFZvzD2Qia6gZumA2SfAWYB4oGVvow7JpJ7oYJ_4lWvJDKmZTZ8bSNVl1CYMzNzYFshToXAnrNLLw/s1600-h/picture44.JPG"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5278454300472937394" style="WIDTH: 400px; CURSOR: hand; HEIGHT: 135px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2prYPx-KXlr_WKDK9nzBMmGeLZP1hroNvlujkAwh_Y93u32_c17EEceXox2X-zTHFZvzD2Qia6gZumA2SfAWYB4oGVvow7JpJ7oYJ_4lWvJDKmZTZ8bSNVl1CYMzNzYFshToXAnrNLLw/s400/picture44.JPG" border="0" /></span></a><span style="font-family:verdana;"><br /><br />After insert we see in the report new data and the state in the database is:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8wDelWk4zUXD2RrIITw8qCUo4vZcC3BPV_u2EqXMerCaCDZif6kRJ5OS7GLSbj9fUrOdCpal2Pa9K2Cc5WX5lDLAQh8FgxbFzZdjtA97_SE0N75G5Zi-j-PJkHyzCPFr3vvz0vxJo58I/s1600-h/picture46.JPG"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5278454298786635730" style="WIDTH: 400px; CURSOR: hand; HEIGHT: 108px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8wDelWk4zUXD2RrIITw8qCUo4vZcC3BPV_u2EqXMerCaCDZif6kRJ5OS7GLSbj9fUrOdCpal2Pa9K2Cc5WX5lDLAQh8FgxbFzZdjtA97_SE0N75G5Zi-j-PJkHyzCPFr3vvz0vxJo58I/s400/picture46.JPG" border="0" /></span></a><span style="font-family:verdana;"><br /><br />Update XML:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnalCoeYpVknb4KcJCrq8akA5ARzuFvt3buqWJBwJuDxNtpgTv6xO93Oj25RS9tdlkklkLv9dW5jM86U9zwPzP34dAoJcn6i65PUve6YtNxaCX04lBGcuTsJNL4qHnnvlCdf1CM2LV464/s1600-h/picture136.jpg"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5293743985772720226" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 91px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnalCoeYpVknb4KcJCrq8akA5ARzuFvt3buqWJBwJuDxNtpgTv6xO93Oj25RS9tdlkklkLv9dW5jM86U9zwPzP34dAoJcn6i65PUve6YtNxaCX04lBGcuTsJNL4qHnnvlCdf1CM2LV464/s320/picture136.jpg" border="0" /></span></a><span style="font-family:verdana;"><br /><br />XML files location:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZBGdEYRgU-vzafQfvJs9e2h518AV8XOrFFRF_XmLHLMWPv0AFla_X850ZYpcuu-FcO4puOPBBkknXKyS1oZpYcG41ZCyEW_rL08csQwsY4RNRgNK7iLs5pj2lyLofWnKzkcXhhF2SMTg/s1600-h/picture137.jpg"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5293744846537611458" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 136px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZBGdEYRgU-vzafQfvJs9e2h518AV8XOrFFRF_XmLHLMWPv0AFla_X850ZYpcuu-FcO4puOPBBkknXKyS1oZpYcG41ZCyEW_rL08csQwsY4RNRgNK7iLs5pj2lyLofWnKzkcXhhF2SMTg/s320/picture137.jpg" border="0" /></span></a><span style="font-family:verdana;"><br /><br />We set writeback template here:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjf1YaL4tpCSCRkHMm4ox-dzPMxLO1HID8Zj5IB0QiltV04LSkZbHkJJZnReGX97lKYvWAgE9dmz1hyphenhyphenVhgP8LshHHlaAVtiPRK46rY_Uf94fZ-H8r_LnY9cyQUFU72q6Gzaj3VUdREnkZM/s1600-h/picture47.JPG"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5278454288094930946" style="WIDTH: 400px; CURSOR: hand; HEIGHT: 112px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjf1YaL4tpCSCRkHMm4ox-dzPMxLO1HID8Zj5IB0QiltV04LSkZbHkJJZnReGX97lKYvWAgE9dmz1hyphenhyphenVhgP8LshHHlaAVtiPRK46rY_Uf94fZ-H8r_LnY9cyQUFU72q6Gzaj3VUdREnkZM/s400/picture47.JPG" border="0" /></span></a><span style="font-family:verdana;"><br /><br />7. Database trigger:<br /><br />create or replace trigger wb_test_af_upd_tr<br />after update<br />ON wb_test<br />declare<br />cursor c1<br />is select 1 as num<br />from wb_test<br />where col1=0;<br />v1 number;<br />begin<br />open c1;<br />fetch c1 into v1;<br />if v1=1 then<br />null;<br />else<br />insert into wb_test values (0,null,null);<br />end if;<br />end loop;<br />close c1;<br />exception<br />when others then<br />null;<br />end;<br /><br /></span><span style="font-family:verdana;color:#ff0000;">*Note<br />We use dummy row insert method.<br />After we insert row (we update dummy row) this new row we don't see in the update report because of Id=0 filter.<br />After update of dummy row we activate trigger in wb_test table which inserts then again this dummy Id=0 row if the one does not exist.<br />The trigger will be activated during regular update.<br />Update is only for rows that have Id greater then zero</span>Goran Ockohttp://www.blogger.com/profile/16571461599213456839noreply@blogger.com4tag:blogger.com,1999:blog-196729317318279460.post-38499992605535687042009-07-09T10:43:00.010+02:002009-07-09T11:31:40.915+02:00Joining different level aggregation measures together into a single logical fact table<span style="font-family:verdana;">We use three tables and each of them has different measure on a different dimension aggregation level. These measures contain different information so we need it all.<br /><br />SH.SALES -> contains detail data about amount and quantity sold.<br /><br />SH.QUANTITY_QUOTAS -> data about quantity quotas on category and month level:<br /><br />create table quantity_quotas<br />as select sum(quantity_sold)+10 as quota, p.prod_category_id, t.calendar_month_id<br />from sales s, times t, products p<br />where s.time_id=t.time_id<br />and p.prod_id=s.prod_id<br />group by p.prod_category_id, t.calendar_month_id<br /><br />HR.ANNUAL_SALES_PLANNED -> on year level.<br /><br />create table annual_sales_planned as<br />select sum(amount_sold)*108 as annual_sales_planned, t.calendar_year_id<br />from sales s, times t<br />where s.time_id=t.time_id<br />group by t.calendar_year_id<br /><br />Now we want to include all these threee tables (measures) in one logical fact table.<br /><br />My connection pool is set to HR so I need to do:<br /><br />create or replace public synonym quantity_quotas for sh.quantity_quotas<br />and<br />grant select on quantity_quotas to hr<br /><br />We created manually separate higher level dimension tables that we used in QUANTITY_QUOTAS and ANNUAL_SALES_PLANNED fact tables:<br /><br />CATEGORY -> select distinct PROD_CATEGORY_ID, PROD_CATEGORY from times<br />MONTHS -> select distinct CALENDAR_MONTH_ID, CALENDAR_MONTH_DESC, CALENDAR_YEAR_ID, CALENDAR_YEAR from times<br />YEARS -> select distinct CALENDAR_YEAR_ID, CALENDAR_YEAR from times<br /><br />Physical diagram:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrriYanKIbL4Xtxfdh_OMtvt4JDzKVZj3f4ryiDhCY212uSlOmjCl2puHFDP6zi019EdsfCqd7khWJ9TI6eSAO62vs4H448YmSEpbt0Ld80pysYM11Wd0pQ6n7lWPBCMKGiUUcNsrLjtw/s1600-h/picture320.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 245px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5327135569858943922" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrriYanKIbL4Xtxfdh_OMtvt4JDzKVZj3f4ryiDhCY212uSlOmjCl2puHFDP6zi019EdsfCqd7khWJ9TI6eSAO62vs4H448YmSEpbt0Ld80pysYM11Wd0pQ6n7lWPBCMKGiUUcNsrLjtw/s320/picture320.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Drag and drop PROD_CATEGORY from CATEGORY table in physical layer to PROD_CATEGORY column in PRODUCTS logical table in BMM. New logical table source appears:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWtcsErJJjq3-G9eRijKaKKtTung9yJypBBFrrUWr_BDq2Qdd4cET6C33KfUK3WqwKivIiuCLxBeQ0qSkcqo2WAZOO_JDl3Nsm2SJIWiDdjlJKIsXjj98tGOdG8F7j__aQcwkXUPd-cEQ/s1600-h/picture321.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 90px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5327134111982029234" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWtcsErJJjq3-G9eRijKaKKtTung9yJypBBFrrUWr_BDq2Qdd4cET6C33KfUK3WqwKivIiuCLxBeQ0qSkcqo2WAZOO_JDl3Nsm2SJIWiDdjlJKIsXjj98tGOdG8F7j__aQcwkXUPd-cEQ/s320/picture321.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Note that there ae two sources for PROD_CATEGORY, this is required to generate separate SQL queries, one for SALES fact table and one for QUANTITY_QUOTAS table.<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-8alrW-7fHWQWLwTZ359NJExk_KXFzOrPnU7G2G5DNCx0yZcSuAE6RREsmkBAvFClClUMNtnrR7Ps4SFXdj4F0TfpQNQGptE-DQP29uTjNsInyOF4vYB3rACKI3LFbQ6iVd_nkkPuDYM/s1600-h/picture322.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 162px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5327136196834220594" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-8alrW-7fHWQWLwTZ359NJExk_KXFzOrPnU7G2G5DNCx0yZcSuAE6RREsmkBAvFClClUMNtnrR7Ps4SFXdj4F0TfpQNQGptE-DQP29uTjNsInyOF4vYB3rACKI3LFbQ6iVd_nkkPuDYM/s320/picture322.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Repeat this step for TIMES logical table, drag and drop columns CALENDAR_MONTHS_DESC and CALENDAR_YEAR from MONTHS table and CALENDAR_YEAR from YEAR table in physical layer into same column names:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfL7qTISb_c5CB9rFvJrSCm7_73XjGLPaSQYl6FWfo2zM2PFmXmlITSF6e8I34nHHjZy1eWevxee_phDeBe8K2kyLIEVqKVaKobPftC8UjEAz8JS7MlDUC4_jms20wtRxRwiLJc4VoLjU/s1600-h/picture323.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 218px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5327141196250135522" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfL7qTISb_c5CB9rFvJrSCm7_73XjGLPaSQYl6FWfo2zM2PFmXmlITSF6e8I34nHHjZy1eWevxee_phDeBe8K2kyLIEVqKVaKobPftC8UjEAz8JS7MlDUC4_jms20wtRxRwiLJc4VoLjU/s320/picture323.JPG" /></span></a><span style="font-family:verdana;"><br /><br />There are two sources for CALENDAR_MONTH_DESC and three sources for CALENDAR_YEAR:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIonuLrWA-HvmJnKHpGK_Jr-gGLJX6LMsXLAk7oNPG0ea6Gs-x8gnCVWFOtirwao1kDr80tHSuJHed6EEX8wBf7cxbr9tKrj1gReN4-Y7-jxGyKX7ELb6pmq_GvB3_NHPgWe4PGi4CvBc/s1600-h/picture324.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 159px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5327141909323555586" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIonuLrWA-HvmJnKHpGK_Jr-gGLJX6LMsXLAk7oNPG0ea6Gs-x8gnCVWFOtirwao1kDr80tHSuJHed6EEX8wBf7cxbr9tKrj1gReN4-Y7-jxGyKX7ELb6pmq_GvB3_NHPgWe4PGi4CvBc/s320/picture324.JPG" /></span></a><span style="font-family:verdana;"><br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSdx-qJti50wUKx-TGLDKP8klporIL5rOM2hKhyphenhyphenLxST-kxO93r1grfRRLISyD5Zls-UZY1s-NzHhfe7P4WZVOKl6cO4Aiu20C4OBDtPXNccYlcUrGOc2Ct0tqECGgHR4PP0mhm9AB3L3E/s1600-h/picture325.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 174px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5327141990947597458" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSdx-qJti50wUKx-TGLDKP8klporIL5rOM2hKhyphenhyphenLxST-kxO93r1grfRRLISyD5Zls-UZY1s-NzHhfe7P4WZVOKl6cO4Aiu20C4OBDtPXNccYlcUrGOc2Ct0tqECGgHR4PP0mhm9AB3L3E/s320/picture325.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Now drag and drop measures from fact tables from physical layer, drop it to on the top of the SALES logical table so that new logical table source and new measure appeared:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIcEnh-qOSpW-fWZmToFLeHfIKZ2_PGXMZ-Q9J_Zhr_FnkwXppIZ0EruKI_mG4O_yKOQIzRWrLJYPQ4kuND61uVUFvNaucsPfEtkSR3Rx3cQx0gTqbsySP6vubEPwUh1K08yfb9HYdpck/s1600-h/picture326.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 244px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5327144164141889186" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIcEnh-qOSpW-fWZmToFLeHfIKZ2_PGXMZ-Q9J_Zhr_FnkwXppIZ0EruKI_mG4O_yKOQIzRWrLJYPQ4kuND61uVUFvNaucsPfEtkSR3Rx3cQx0gTqbsySP6vubEPwUh1K08yfb9HYdpck/s320/picture326.JPG" /></span></a><span style="font-family:verdana;"><br /><br />We don't need to setup for logical table sources QUANTITY_QUOTAS and ANNUAL_SALES_PLANNED aggregation content group by to be in certain logical dimension level:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhoHBnNL9AqpsFGY8BQxbE3VzUvZkLaPD42LR3VfkWpDM_5euOK69QZxObkWpl3NPsvfdJ9ysMb19OZXPWuIHF6r9XBQwyNt7YwnlPvKQr4vmkn5FepPuIMxKWwSw-j7EqAEG9hEkFee8M/s1600-h/picture327.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 155px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5327146805812220146" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhoHBnNL9AqpsFGY8BQxbE3VzUvZkLaPD42LR3VfkWpDM_5euOK69QZxObkWpl3NPsvfdJ9ysMb19OZXPWuIHF6r9XBQwyNt7YwnlPvKQr4vmkn5FepPuIMxKWwSw-j7EqAEG9hEkFee8M/s320/picture327.JPG" /></span></a><span style="font-family:verdana;"><br /><br />This works without that. How we know this?<br /><br />I introduce a similar model diagram in one of my previous post about time series modelling<br /></span><a href="http://108obiee.blogspot.com/2009/01/time-series-modelling.html"><span style="font-family:verdana;">http://108obiee.blogspot.com/2009/01/time-series-modelling.html</span></a><span style="font-family:verdana;">.<br /><br />I explained situation when OBIEE generates more than one queries, in this case three separate queries will be generated if we choose for example column CALENDAR_YEAR, because it has three dimension logical table sources and according to our physical model diagram each of them (MONTHS, YEARS and TIMES) is joined to a different measure in different fact tables (SALES, ANNUAL_SALES_PLANNED and QUANTITY_QUOTAS). So we see only three queries in NQQuery.log OBIEE join them with group by column that is common to all three queries.<br /><br />Test:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhP-ZgxC1IQl-CTaBHHA2YutiBRRgY7XL7_DJp4j6EkQyHyj2XFbEImosM8-WOgj5YL-2fNAkPQcb8vegrPygnTH_O4kXGyhHe8gXZPk-GYdd8HtSO9Lwc2WizFBMEAdPnwsbguTOeIOO0/s1600-h/picture330.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 45px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5327424705646218658" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhP-ZgxC1IQl-CTaBHHA2YutiBRRgY7XL7_DJp4j6EkQyHyj2XFbEImosM8-WOgj5YL-2fNAkPQcb8vegrPygnTH_O4kXGyhHe8gXZPk-GYdd8HtSO9Lwc2WizFBMEAdPnwsbguTOeIOO0/s320/picture330.JPG" /></span></a><span style="font-family:verdana;"><br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfeBxBjzWc86PG3nF2PJLla3DEuSdvDRuvU3d7Tw3-wr1v-NGH8U24u0tu0EKeNRQ8k8wKeSqKnrSFlmL5lnbsah3JeZT2yAuwMpclbKosPrj_34VfvcKrjFHXMWhEXSO0Qvd94Chci8Q/s1600-h/picture331.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 63px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5327424783957805490" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfeBxBjzWc86PG3nF2PJLla3DEuSdvDRuvU3d7Tw3-wr1v-NGH8U24u0tu0EKeNRQ8k8wKeSqKnrSFlmL5lnbsah3JeZT2yAuwMpclbKosPrj_34VfvcKrjFHXMWhEXSO0Qvd94Chci8Q/s320/picture331.JPG" /></span></a><span style="font-family:verdana;"><br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibKi3jvRe9Z1lR36uTpNHBWCZlhcjUTDaAcgA0YOAreCWxqF_OInXYKsRLn2XM3Qev4sIrJ9NjeJyYRfkcs70LkMdZI4ljn_4YELKh8nO8s-cNuMEBZOLPvk4EMsD7CYeQ3UYhAaUSUfU/s1600-h/picture332.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 254px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5327424887863420226" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibKi3jvRe9Z1lR36uTpNHBWCZlhcjUTDaAcgA0YOAreCWxqF_OInXYKsRLn2XM3Qev4sIrJ9NjeJyYRfkcs70LkMdZI4ljn_4YELKh8nO8s-cNuMEBZOLPvk4EMsD7CYeQ3UYhAaUSUfU/s320/picture332.JPG" /></span></a><span style="font-family:verdana;"><br /><br />We see that all three tables can summarize data on year level.<br /><br />Now if we group by only by CALENDAR_MONTH_DESC:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibVu6D9tf2lKhBhh7W1GTCBTca2cVuv0cxWxpmhfOb6cCZaH5NsC_DMEb5U6aPbWbZM8iQRSB9wbfNS0P89lFTCl_tmmZIYV3hoaKTOD_yeEX2n16kmqYd8xO9DYQ19mY-rdn3nFpPhvQ/s1600-h/picture333.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 39px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5327429592048217474" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibVu6D9tf2lKhBhh7W1GTCBTca2cVuv0cxWxpmhfOb6cCZaH5NsC_DMEb5U6aPbWbZM8iQRSB9wbfNS0P89lFTCl_tmmZIYV3hoaKTOD_yeEX2n16kmqYd8xO9DYQ19mY-rdn3nFpPhvQ/s320/picture333.JPG" /></span></a><span style="font-family:verdana;"><br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1fK59apqPR8N7q8QQ6ZTc2t4yzyIiogsnUKoh40ESNnIv2bQNnfFN8MzraUFD-T_nviUqdvSlNFqsYF2LOmXE5CL9Y-Lc1EHIh4vc4Bcx6lODDHxWiSvL8NnHSAil2s18vtcMvKGsGQo/s1600-h/picture334.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 152px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5327429713342153362" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1fK59apqPR8N7q8QQ6ZTc2t4yzyIiogsnUKoh40ESNnIv2bQNnfFN8MzraUFD-T_nviUqdvSlNFqsYF2LOmXE5CL9Y-Lc1EHIh4vc4Bcx6lODDHxWiSvL8NnHSAil2s18vtcMvKGsGQo/s320/picture334.JPG" /></span></a><span style="font-family:verdana;"><br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEHR4qmnuV8lgDYD2quWYTUeKvWp6SfJzKL1XK5roSZj-s4u1RmFUUV5K7W75edWDqdXDC5onAs80Y6uYIcqXdDSONEWI_0W3X7qj48GSEI1JPujWGpKJ51ZuW64ZmD3oGxKOFzv9bN74/s1600-h/picture335.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 189px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5327429790751797202" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEHR4qmnuV8lgDYD2quWYTUeKvWp6SfJzKL1XK5roSZj-s4u1RmFUUV5K7W75edWDqdXDC5onAs80Y6uYIcqXdDSONEWI_0W3X7qj48GSEI1JPujWGpKJ51ZuW64ZmD3oGxKOFzv9bN74/s320/picture335.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Only first two queries are populated. The third one (ANNUAL_SALES_PLANNED fact table) is not because it contains data on year lever only, not lower. So null value is populated for ANNUAL_SALES_PLANNED measure.</span>Goran Ockohttp://www.blogger.com/profile/16571461599213456839noreply@blogger.com1tag:blogger.com,1999:blog-196729317318279460.post-18854333852824693832009-07-06T10:08:00.000+02:002009-07-06T10:31:29.669+02:00OBIEE usage tracking setup and cloning reports with CAF<span style="font-family:verdana;"><strong>Usage tracking repository and catalog setup</strong><br /><br />Finally I did usage tracking setup in OBIEE. There is a good doc/example in Oracle by example site </span><a href="http://www.oracle.com/technology/obe/obe_bi/bi_ee_1013/usage_tracking/usage_tracking.htm#t1"><span style="font-family:verdana;">http://www.oracle.com/technology/obe/obe_bi/bi_ee_1013/usage_tracking/usage_tracking.htm#t1</span></a><span style="font-family:verdana;"> in John Minkjan's blog </span><a href="http://obiee101.blogspot.com/2008/08/obiee-setting-up-usage-tracking.html"><span style="font-family:verdana;">http://obiee101.blogspot.com/2008/08/obiee-setting-up-usage-tracking.html</span></a><span style="font-family:verdana;"> and Rittman Mead </span><a href="http://www.rittmanmead.com/2008/10/11/comparing-obiee-usage-tracking-with-nqsquerylog/"><span style="font-family:verdana;">http://www.rittmanmead.com/2008/10/11/comparing-obiee-usage-tracking-with-nqsquerylog/</span></a><span style="font-family:verdana;">. Also there are many sources of this information on other sites/bloges.<br /><br />I will use my SH user to create usage tracking tables into it.<br /><br />Use SAACCT.Oracle.sql to create table S_NQ_ACCT. Script can be found in ..OracleBI\server\SchemaScripts folder. After that jump into D:\OracleBI\server\Sample\usagetracking\SQL_Server_Time. There are some scripts that we need to start.<br /><br />Decription of S_NQ_ACCT columns (description of usage tracking data) is available in Oracle Business Intelligence documentation Oracle Business Intelligence Server<br />Administration Guide in the table 42 on the page 406.<br /><br />Run scripts:<br /><br />Oracle_create_nQ_Calendar.sql (create S_ETL_DAY)<br />Oracle_create_nQ_Clock.sql (create S_ETL_TIME_DAY)<br />Oracle_nQ_Calendar.sql (insert into S_ETL_DAY)<br />Oracle_nQ_Clock.sql (insert into S_ETL_TIME_DAY)<br /><br />We make these tables public:<br /><br />GRANT SELECT ON S_ETL_DAY TO PUBLIC;<br />GRANT SELECT ON S_ETL_TIME_DAY TO PUBLIC;<br /><br />Now we need to merge usagetracking.rpd into our current rpd online.<br /><br />I copy/paste my current online rpd and save it as ofline. This repository I'll open at first and also I make a copy of it, and this copy is only for OBIEE to allow me to merge (this is required although they are the same).<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiM3XrvIhVS4Bs6ekSd9ok6k20TbQxzJHgK_YaqAgA31wGnUUUUNbN8-ba4kSWp2gyDTR5LYlTtAp4eoNXJJopBZWNUul1KkaUGJ1_WnMpIu2V1YjzfzPA0caaqx4kRAwl2Q50AOmXDP_k/s1600-h/picture370.JPG"><span style="font-family:verdana;"><img style="WIDTH: 275px; HEIGHT: 75px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5354152231615706626" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiM3XrvIhVS4Bs6ekSd9ok6k20TbQxzJHgK_YaqAgA31wGnUUUUNbN8-ba4kSWp2gyDTR5LYlTtAp4eoNXJJopBZWNUul1KkaUGJ1_WnMpIu2V1YjzfzPA0caaqx4kRAwl2Q50AOmXDP_k/s320/picture370.JPG" /></span></a><span style="font-family:verdana;"><br /><br />We get the message that repositories are identical.<br /><br />Now, we add usagetracking.rpd as modified repository.<br /><br />We merge information from usagetracking.rpd to our tecaj.rpd.<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhN_w6uasjnhkO4cQlusygvR-HOwm240wg2VQG8ieVAG8qNyi4gvNxj-BIKdOvGth6xRvZgJMA8tCMAqKC5MVa7pPbq3xCT2-IgV-NsWPA4C7AWimvHI1vfyl3AjotD9XsXaI83mPd920Y/s1600-h/picture371.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 194px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5354153563804752754" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhN_w6uasjnhkO4cQlusygvR-HOwm240wg2VQG8ieVAG8qNyi4gvNxj-BIKdOvGth6xRvZgJMA8tCMAqKC5MVa7pPbq3xCT2-IgV-NsWPA4C7AWimvHI1vfyl3AjotD9XsXaI83mPd920Y/s320/picture371.JPG" /></span></a><span style="font-family:verdana;"><br /><br />After merging ignore delete failed message.<br /><br />A new repository has been created.<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCAi0Y_3L8TEsVfNx6PQKJB670xM-I1QBga_F7_ZHW3sJsYVq0F90k75TOvS4bB7J80C7kshQ9mvOunMVbNCmDuU7zfZeH4W17s97riwTmRZswq4EtZmQe9L9lIyWhfIUfPzwd7wAD7gQ/s1600-h/picture374.JPG"><span style="font-family:verdana;"><img style="WIDTH: 281px; HEIGHT: 130px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5354166681083823378" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCAi0Y_3L8TEsVfNx6PQKJB670xM-I1QBga_F7_ZHW3sJsYVq0F90k75TOvS4bB7J80C7kshQ9mvOunMVbNCmDuU7zfZeH4W17s97riwTmRZswq4EtZmQe9L9lIyWhfIUfPzwd7wAD7gQ/s320/picture374.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Save new merged repository and owerwrite original tecaj.rpd.<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhS0_ml_xyOpj_PXbY5SqR58ZQmP9LMPSJBwFzmKbTjRnT5ZQq1J7sIRT9hv48H5HcRLwrf3WfM7MIy2EAhgJSHrmvO4_n186yatIKPaaNNcBcp3iS9jLpAdztvC_g8BkWFVdbb4VHnLVU/s1600-h/picture372.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 250px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5354157349107306530" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhS0_ml_xyOpj_PXbY5SqR58ZQmP9LMPSJBwFzmKbTjRnT5ZQq1J7sIRT9hv48H5HcRLwrf3WfM7MIy2EAhgJSHrmvO4_n186yatIKPaaNNcBcp3iS9jLpAdztvC_g8BkWFVdbb4VHnLVU/s320/picture372.JPG" /></span></a><span style="font-family:verdana;"><br /><br />We need to put some changes to OBI Usage Tracking database folder, connection pools in the physical layer and also in NQSConfig.ini in ..\OracleBI\server\Config.<br /><br />I set my SH user to connection pools Usage Tracking Writer Connection Pool and Connection pool. The first is for writing and the second just for reading.<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsKn0An5FPCRevCDeu5h31truWQLrJXCk-WtucHqfUHquFe3EAGSBTjiuAcki8-Rt4MgQp6nIoBsQRtCzmll1cVmBBRuVOIIsG4NwOXV4BtelyE0ike4a-TbxVaIdFtNgZ9etojyIoDbw/s1600-h/picture373.JPG"><span style="font-family:verdana;"><img style="WIDTH: 263px; HEIGHT: 320px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5354164599156558770" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsKn0An5FPCRevCDeu5h31truWQLrJXCk-WtucHqfUHquFe3EAGSBTjiuAcki8-Rt4MgQp6nIoBsQRtCzmll1cVmBBRuVOIIsG4NwOXV4BtelyE0ike4a-TbxVaIdFtNgZ9etojyIoDbw/s320/picture373.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Don't forget to create vie NQ_LOGIN_GROUP:<br /><br />create view NQ_LOGIN_GROUP as<br />select distinct USER_NAME as LOGIN, USER_NAME as RESP<br />from S_NQ_ACCT;<br /><br />grant select on nq_login_group to public;<br /><br />Changes in NQSConfig.ini:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2EPgK73T1cyKVShTun0VhzDnMPSOUqTaRw-fhHV0y_I_nXY8MSqOqwePLzkpjvoBGolNv0tGLVGStTOiL391xvJJfdf675BenKz2snQzjEyNg0zRmFoeFw6rB6Ag-lLl0LSpFf2IosVI/s1600-h/picture375.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 183px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5354169284214251074" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2EPgK73T1cyKVShTun0VhzDnMPSOUqTaRw-fhHV0y_I_nXY8MSqOqwePLzkpjvoBGolNv0tGLVGStTOiL391xvJJfdf675BenKz2snQzjEyNg0zRmFoeFw6rB6Ag-lLl0LSpFf2IosVI/s320/picture375.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Before merging usage tracking catalog (reports) into our current catalog online, make sure that you copy/paste your new merged repository into ..OracleBI\server\Repository folder and owerwrite the old one.<br /><br />For merging usage tracking reports I'll use Content Accelerator Framework (CAF) clone option. I'll not explain procedure for installing Content Accelerator Framework (CAF), you can find it on the </span><a href="http://www.oracle.com/technology/products/bi/pdf/oraclebiee-cafv1-usage-instructions.pdf"><span style="font-family:verdana;">http://www.oracle.com/technology/products/bi/pdf/oraclebiee-cafv1-usage-instructions.pdf</span></a><span style="font-family:verdana;">.<br /><br />In ..OracleBI\server\Sample\usagetracking there is a UsageTracking.zip. If you unzip it you'll get usage tracking catalog.<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPdLZ2BY13Cun08ruYhGYeu35E_N0ZCeVqZpL4GxVrtkpzogovFMEGTfGaeDq1TiJzJkfKNL2rsDwhCosPdB1gjpVjTPSzkLGQlTOFVg6tvE6Ja15KjiO7-7-iP5S0NsjVF9i0u-wXqf4/s1600-h/picture377.JPG"><span style="font-family:verdana;"><img style="WIDTH: 288px; HEIGHT: 99px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5355250361023632994" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPdLZ2BY13Cun08ruYhGYeu35E_N0ZCeVqZpL4GxVrtkpzogovFMEGTfGaeDq1TiJzJkfKNL2rsDwhCosPdB1gjpVjTPSzkLGQlTOFVg6tvE6Ja15KjiO7-7-iP5S0NsjVF9i0u-wXqf4/s320/picture377.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Open usage tracking catalog ofline and merge it to our current online web catalog. You'll need to open two instances of catalog manager application.<br /><br />Copy/paste this path to catalog:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjh5vPHIMlIeRvbpUQAyYKHOxn-0ImW7JhOkzTicDxYP1_zENpwMQ4Mvqs2AVZwZejzelQw7EK4joncMTa2RM1b_eHd89nrDip2vsblUYz5EWx7NEjMvnRvgq48KjlDnZMtDg5KSZd0MV8/s1600-h/picture378.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 54px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5355251430006639650" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjh5vPHIMlIeRvbpUQAyYKHOxn-0ImW7JhOkzTicDxYP1_zENpwMQ4Mvqs2AVZwZejzelQw7EK4joncMTa2RM1b_eHd89nrDip2vsblUYz5EWx7NEjMvnRvgq48KjlDnZMtDg5KSZd0MV8/s320/picture378.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Copy usage tracking reports and dashboards from shared folder:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjly5ctPpn-rInAPwrRwym8No_yVaMMt3bRmTXtMXajvoYCZXVU5g_MaT-Ah-cTbRo74aGBtk-C2EkwYwIPbrNiOXHh4wQz7IXXXLd7i8u2Tmr0ot0cH7A9QBpayaYz6FTgM_Eyc85T4OI/s1600-h/picture379.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 133px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5355253525425472194" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjly5ctPpn-rInAPwrRwym8No_yVaMMt3bRmTXtMXajvoYCZXVU5g_MaT-Ah-cTbRo74aGBtk-C2EkwYwIPbrNiOXHh4wQz7IXXXLd7i8u2Tmr0ot0cH7A9QBpayaYz6FTgM_Eyc85T4OI/s320/picture379.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Paste it to a web catalog online shared folder:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmiu-kCQLEddbY6qZVNsdymgtk5GQIuyv4ZsIy7W4FITgyoLtpyKRZjFnTicqLHIEDAz39yQ4WkYafIQ6SFr8oVy16v8_5UwkCvfr7tAW2uqGyYcILFp_95aXBupxEHvfY7q0gRCQPrj8/s1600-h/picture380.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 137px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5355253717261215474" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmiu-kCQLEddbY6qZVNsdymgtk5GQIuyv4ZsIy7W4FITgyoLtpyKRZjFnTicqLHIEDAz39yQ4WkYafIQ6SFr8oVy16v8_5UwkCvfr7tAW2uqGyYcILFp_95aXBupxEHvfY7q0gRCQPrj8/s320/picture380.JPG" /></span></a><span style="font-family:verdana;"><br /><br />You'll se usage tracking in online web catalog shared folder. We did a usage tracking reports and dashboards migration in online web catalog.<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXaDjEVJRbSg3DNA2l91eag4ZM9IR5P1J9Q6Ne-0VgBXkzacOTnFccwmYp9PqbLQG8ITSr-SI-NpUrla-A6HS-_zdnSfyZdR4kd1DH5YZW8DLHQWkgubcsesmiBSfNky6xrxBe0AMyvkY/s1600-h/picture381.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 183px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5355254067570796066" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXaDjEVJRbSg3DNA2l91eag4ZM9IR5P1J9Q6Ne-0VgBXkzacOTnFccwmYp9PqbLQG8ITSr-SI-NpUrla-A6HS-_zdnSfyZdR4kd1DH5YZW8DLHQWkgubcsesmiBSfNky6xrxBe0AMyvkY/s320/picture381.JPG" /></span></a><span style="font-family:verdana;"><br /><br /><strong>Cloning reports with Content Accelerator Framework (CAF) V1</strong><br /><br />Now, open Content Accelerator Framework (CAF) V1 and try to clone these usage tracking reports just for test.<br /><br />We use copy of online repository:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0xOhvCZNM9kDOYLyoSCDNW0pFLS1gXQQSN_l4RKralZqOTrMDxt_1DkyAT5AtyLoJGfHWI1TNG7YA0lqUxEuU5rtLy34W4sekRpX5fwof9Zv9zENWfxe03gc6Rd65BUTfigrshZ0d_Y4/s1600-h/picture383.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 49px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5355255699804806514" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0xOhvCZNM9kDOYLyoSCDNW0pFLS1gXQQSN_l4RKralZqOTrMDxt_1DkyAT5AtyLoJGfHWI1TNG7YA0lqUxEuU5rtLy34W4sekRpX5fwof9Zv9zENWfxe03gc6Rd65BUTfigrshZ0d_Y4/s320/picture383.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Clone all usage tracking reports:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhknyaZbKam20_z1o1ET2CaJ8eA3mGHR4dDUo7I_CvIgZxPyJQcScio3g43xodBjQWe3v3vtyJpV7s4MfWLJmkIAkajLk6YYaJxqnzMqG3xz4OledBPozzryWzI8iwNdBYkgIJ8ZYnD4vI/s1600-h/picture382.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 242px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5355256044099242706" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhknyaZbKam20_z1o1ET2CaJ8eA3mGHR4dDUo7I_CvIgZxPyJQcScio3g43xodBjQWe3v3vtyJpV7s4MfWLJmkIAkajLk6YYaJxqnzMqG3xz4OledBPozzryWzI8iwNdBYkgIJ8ZYnD4vI/s320/picture382.JPG" /></span></a><span style="font-family:verdana;"><br /><br />The same repository file we are using for source and the target repository because we just want to copy/clone reports:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkp1IYRbo0JrFKaHqIg6jiQyd5GmZ3yJ62B2LTIIsO1ymJ8wHcLS-4asOozrVwE-rwDw6gVl3xVwoU-8K_8eeqdBWUge4qO9HudKrR9SVUER8rOTU3W7qnRAJ0X8ZBWN_rh3tOTkXJIpk/s1600-h/picture384.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 258px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5355256801338706226" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkp1IYRbo0JrFKaHqIg6jiQyd5GmZ3yJ62B2LTIIsO1ymJ8wHcLS-4asOozrVwE-rwDw6gVl3xVwoU-8K_8eeqdBWUge4qO9HudKrR9SVUER8rOTU3W7qnRAJ0X8ZBWN_rh3tOTkXJIpk/s320/picture384.JPG" /></span></a><span style="font-family:verdana;"><br /><br />We choose usage tracking subject area and make required object mappings:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSk1cd-_VlXugMoOmPhK2MNw-5TGLg0WGvxOkEgl_rvuVEy-nOqKnpCLG8B-4b69gYVrlHVa6DzEnTnNx9vTZhDx7EGVLPt480ZxW4dNLqY-QAud1cvUuOwmRe3_YqjxXvU7hfOe0n7c8/s1600-h/picture385.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 255px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5355258405903837794" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSk1cd-_VlXugMoOmPhK2MNw-5TGLg0WGvxOkEgl_rvuVEy-nOqKnpCLG8B-4b69gYVrlHVa6DzEnTnNx9vTZhDx7EGVLPt480ZxW4dNLqY-QAud1cvUuOwmRe3_YqjxXvU7hfOe0n7c8/s320/picture385.JPG" /></span></a><span style="font-family:verdana;"><br /><br />You can change the name of the target report, add yome prefix, etc. Cloned reports are in the cloned folder:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIPLlEFnZX608jbtPaNFa7oKJqd4dJ_4RKwnP32COtGfrI3GYiygXQcfFMFyEkXonx0sWeJAzhh1i4fIjRRQZYSnAGbSct9nbrcq543SBq06j_J4TAdI-nciK4HRr_Zjfzai0UUmnkNBU/s1600-h/picture386.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 198px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5355259555674882962" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIPLlEFnZX608jbtPaNFa7oKJqd4dJ_4RKwnP32COtGfrI3GYiygXQcfFMFyEkXonx0sWeJAzhh1i4fIjRRQZYSnAGbSct9nbrcq543SBq06j_J4TAdI-nciK4HRr_Zjfzai0UUmnkNBU/s320/picture386.JPG" /></span></a><span style="font-family:verdana;"><br /></span>Goran Ockohttp://www.blogger.com/profile/16571461599213456839noreply@blogger.com0tag:blogger.com,1999:blog-196729317318279460.post-29017029252394172982009-06-29T16:29:00.002+02:002009-06-30T10:30:10.425+02:00Same page navigation drills using drill in place, iframes and embedded content in section<span style="font-family:verdana;">In this lession I'll cover same page navigation drills between two reports (not two dashboard pages), and I'll show how to implement this by using different methods and what are disadvantages and advantages of each of them. We want to stay in the focus of the first report (same page navigation) when we call the second report, for all cases.<br /><br />We'll use reports:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhj9Kcb7A9mJjOaKrNMwdxyKIFTbEA3fbsc7cbVdwCKfnapzCVgbehW8QU79bEKsAlNbqNeRgRGB6jAnubLTyw8wOBTy55axVmM1CYiRDJr8sH4j4Qcmq-UPDcJ1ssljdk-NzqSUp6pZww/s1600-h/picture351.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 120px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5352733793654337890" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhj9Kcb7A9mJjOaKrNMwdxyKIFTbEA3fbsc7cbVdwCKfnapzCVgbehW8QU79bEKsAlNbqNeRgRGB6jAnubLTyw8wOBTy55axVmM1CYiRDJr8sH4j4Qcmq-UPDcJ1ssljdk-NzqSUp6pZww/s320/picture351.JPG" /></span></a><span style="font-family:verdana;"><br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxhIfDk379mScaEAuoiKXq2MvGGa8I4yK7t9ldYZkoMa9OVtUgg_a_jG-OtqyKLJF9v70XxznUn1CsDa05K1KD2bFasU3qsUJbN3By7TFPOCrqdlY6luwk_P5q_ywKZPbZe8Uq5MrJQ90/s1600-h/picture352.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 140px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5352735850295622962" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxhIfDk379mScaEAuoiKXq2MvGGa8I4yK7t9ldYZkoMa9OVtUgg_a_jG-OtqyKLJF9v70XxznUn1CsDa05K1KD2bFasU3qsUJbN3By7TFPOCrqdlY6luwk_P5q_ywKZPbZe8Uq5MrJQ90/s320/picture352.JPG" /></span></a><span style="font-family:verdana;"><br /><br />On the PROD_CATEGORY (Navigate) column (Report23) we set value interaction to navigate to Report 24:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjo0WUQD0dGn45JxY4DrXhHTRVm3QzG6nzq8GXA_DTte8-GWoIewHA4b6MnctKm9L5VU8uTxyZA6MDbnNj0zZBhKUAHh-7pxuVZ9X6lCGzHLIDvzCoRXGXXODuHIq5mYfmxjqkpM2yZkY0/s1600-h/picture353.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 297px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5352736903083038002" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjo0WUQD0dGn45JxY4DrXhHTRVm3QzG6nzq8GXA_DTte8-GWoIewHA4b6MnctKm9L5VU8uTxyZA6MDbnNj0zZBhKUAHh-7pxuVZ9X6lCGzHLIDvzCoRXGXXODuHIq5mYfmxjqkpM2yZkY0/s320/picture353.JPG" /></span></a><span style="font-family:verdana;"><br /><br />On the PROD_CATEGORY (Dimension drill) column (Report23) we set dimension level drill down:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVNKIS5f4HFBF2_EFEk9bzi-R-F9b5zeziQFIpcJ4NHLG3OMfsUYMpaUShVHUo87IazQtLrXsLHochg7ECkatlX-gkjVFfNEO1D7RyhGblG8A_MndmWYS4_yO0M6Ea1X8z9cAz9kZFemg/s1600-h/picture354.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 278px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5352738379486149010" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVNKIS5f4HFBF2_EFEk9bzi-R-F9b5zeziQFIpcJ4NHLG3OMfsUYMpaUShVHUo87IazQtLrXsLHochg7ECkatlX-gkjVFfNEO1D7RyhGblG8A_MndmWYS4_yO0M6Ea1X8z9cAz9kZFemg/s320/picture354.JPG" /></span></a><span style="font-family:verdana;"><br /><br />GO URL to Report 24 column on Report23:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnvlmzcuuGiuWZYtkq2AtE4Z3gkzpPjJtkw5Gl6c2hxwqZAnuR09768ZzrZRNnAHSjzm_Xn8P4uobq_zVQsCzhPCv5RYkp4IGhHYr3KmeWtJhHNxu86tTgWh2diiALpW5IPc0T98V82j4/s1600-h/picture355.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 123px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5352739522061445090" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnvlmzcuuGiuWZYtkq2AtE4Z3gkzpPjJtkw5Gl6c2hxwqZAnuR09768ZzrZRNnAHSjzm_Xn8P4uobq_zVQsCzhPCv5RYkp4IGhHYr3KmeWtJhHNxu86tTgWh2diiALpW5IPc0T98V82j4/s320/picture355.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Current iframe column:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9bRsk8B7EOeD3xtmqTjNySD2ByCJjWO_cQ06TpM80SX2Evzr4Z70VDs2tfez_qQ2WkzXEonsKH-eaFOi0xK2fmvM7g4wSFN5A5TRZmXcjm4HPwgeQIGHVbAWkzBOoVILEJGDUxp69zQc/s1600-h/picture356.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 142px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5352740106717134290" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9bRsk8B7EOeD3xtmqTjNySD2ByCJjWO_cQ06TpM80SX2Evzr4Z70VDs2tfez_qQ2WkzXEonsKH-eaFOi0xK2fmvM7g4wSFN5A5TRZmXcjm4HPwgeQIGHVbAWkzBOoVILEJGDUxp69zQc/s320/picture356.JPG" /></span></a><span style="font-family:verdana;"><br /><br />GO URL to Report 23 column on Report24:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4jMT_VQV5G8U0MygxD4Vn6eIh9C0kX1UNvwICA96Mhh6_TCJ-EtVAnSwyQlTbX3Y84agltI_OTch1A5mCctuWFQxLdF39ySdFxidlUh8rtUi2yyBy3vnzHStXECBmVTvjvWvQ1KWp_7k/s1600-h/picture357.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 126px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5352741064884288930" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4jMT_VQV5G8U0MygxD4Vn6eIh9C0kX1UNvwICA96Mhh6_TCJ-EtVAnSwyQlTbX3Y84agltI_OTch1A5mCctuWFQxLdF39ySdFxidlUh8rtUi2yyBy3vnzHStXECBmVTvjvWvQ1KWp_7k/s320/picture357.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Here we try to turn back dashboard prompt presentation variable from the first focus (when we choose it for the Report23) for returning back from Report24 to Report23 because we don't want to reset previous filter (but this don't work for navigation between two reports on the same page, it works only for navigation between two dashboard pages)<br /><br /><strong>Report navigation inside iframe</strong><br /><br />We build iframe for Report23 and show it as narrative view in the dashboard.<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIn2dKq7_QcC5o8aMkX9s0qrVTUFXfqIf48YOp_cvDnP_1v3qaft16tpatNW7SQxmbDdZ0exHlJrUxUqwuaRLkmPH2n7nb18W4hpTskQzxyVe44qVMxWDZYloGsL3HQeVlV5qxsB6LgyM/s1600-h/picture360.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 158px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5352752573502980018" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIn2dKq7_QcC5o8aMkX9s0qrVTUFXfqIf48YOp_cvDnP_1v3qaft16tpatNW7SQxmbDdZ0exHlJrUxUqwuaRLkmPH2n7nb18W4hpTskQzxyVe44qVMxWDZYloGsL3HQeVlV5qxsB6LgyM/s320/picture360.JPG" /></span></a><span style="font-family:verdana;"><br /><br />Column is described above (Current iframe). With this, we have ensured ourself that everything is staying in the same focus (same page).<br /><br />We test it:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRuehzqE9ZanECI1K2SCfLtDWeg4kZTTKE6LNEButJwxihq681TgKAkUO02hj-0o86ryXwfUv3QjL_eLU5JG7U9XbpFR3xNpf23X_nqa1DjAUYG6xmH8h4DEr848HvfA6X46nqpflfxGI/s1600-h/picture358.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 65px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5352746161247262706" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRuehzqE9ZanECI1K2SCfLtDWeg4kZTTKE6LNEButJwxihq681TgKAkUO02hj-0o86ryXwfUv3QjL_eLU5JG7U9XbpFR3xNpf23X_nqa1DjAUYG6xmH8h4DEr848HvfA6X46nqpflfxGI/s320/picture358.JPG" /></span></a><span style="font-family:verdana;"><br /><br />If we navigate from all three columns we stayed in the same page (same focus. same window) and that is right. But here is the problem if we go to Report24 (from the first or the third column) and try to return back with GO URL to Report 23 column on Report24 we cannot set the previous filter in Report23 with presentation variable that we choosed. Report24 cannot see it. So if we go to that link, we get all records:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaR8t6P3lpBAIgir8-vhrM_YNFIdCKh-7oamKdsX2yeEAgJET85wf1w1c16WGE9RVIdMkD_xbbfwfHFE7M_62GYW41MEP7kWekbRobOA-DHe2egJ_dqF0GwvrRNA3m53SniOcbyFOhxQs/s1600-h/picture359.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 91px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5352749961138621218" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaR8t6P3lpBAIgir8-vhrM_YNFIdCKh-7oamKdsX2yeEAgJET85wf1w1c16WGE9RVIdMkD_xbbfwfHFE7M_62GYW41MEP7kWekbRobOA-DHe2egJ_dqF0GwvrRNA3m53SniOcbyFOhxQs/s320/picture359.JPG" /></span></a><span style="font-family:verdana;"><br /><br /><strong>Drill in place inside a section</strong><br /><br />This only works for dimension level attributes drills and it has the same dashboard page focus. Otherwise it opens new window and loses focus.<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_KACMESUXKNaB9tcD4yqXaKzR2GCeVZ-6YyvJZ4vCmDJSSaMDQCYQvroQgx4_L9LxVemQMZvajhd6TFqAWX_DfXtyE8mCjAa073gXod1OnzOL_aPVnlTH3S1ex19vELVL7Vuhf-GBgEU/s1600-h/picture361.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 106px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5352753445794105954" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_KACMESUXKNaB9tcD4yqXaKzR2GCeVZ-6YyvJZ4vCmDJSSaMDQCYQvroQgx4_L9LxVemQMZvajhd6TFqAWX_DfXtyE8mCjAa073gXod1OnzOL_aPVnlTH3S1ex19vELVL7Vuhf-GBgEU/s320/picture361.JPG" /></span></a><span style="font-family:verdana;"><br /><br /><strong>Embedded content in section</strong><br /><br />Everything works fine, focus is always in the same dashboard page when we navigate using all methods except we cannot use dashboard prompts, neither presentation variables in reports that are inside embedded content. We didn't use drill in place option in the section.<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1ixJqA8_yZKDKTDUZNETrCXdxh8IHP8InkgE8Ef7yToahDbBIKUxOWjcdeghFuPQy_Cy7HqiKLZ29ZxmjQSTYDU96MDogjKnbCg2v3vDke53HJ0pv6gm9AMktnAYZal-FUZT2fnbGTe4/s1600-h/picture362.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 86px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5352756279707847746" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1ixJqA8_yZKDKTDUZNETrCXdxh8IHP8InkgE8Ef7yToahDbBIKUxOWjcdeghFuPQy_Cy7HqiKLZ29ZxmjQSTYDU96MDogjKnbCg2v3vDke53HJ0pv6gm9AMktnAYZal-FUZT2fnbGTe4/s320/picture362.JPG" /></span></a><span style="font-family:verdana;"><br /><br />GO URL in embedded content properties:<br /><br />http://localhost:9704/analytics/saw.dll?GO&nquser=Administrator&path=/shared/Development/Report%2023&Action=Navigate</span>Goran Ockohttp://www.blogger.com/profile/16571461599213456839noreply@blogger.com1tag:blogger.com,1999:blog-196729317318279460.post-21709939843606996442009-05-28T11:30:00.011+02:002009-05-28T12:13:22.981+02:00How to add leading zeros after selecting value from a calendar dashboard prompt<span style="font-family:verdana;">I received an email about the problem in date format when choosing value from calendar dashboard prompt, it’s shows 2009-5-1 for example without leading zero. It should show 2009-05-01. This question/issue has also been posted on OTN Discusion Forum </span><a href="http://forums.oracle.com/forums/thread.jspa?threadID=904990&tstart=0"><span style="font-family:verdana;">http://forums.oracle.com/forums/thread.jspa?threadID=904990&tstart=0</span></a><span style="font-family:verdana;">.<br /><br />First, set the correct format in localedefinitions.xml:<br /><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhY5cIPZf_RYBk9yQfnLjyikzd1XAJUaUs0szhcfny_Ik_b0CGYRakb_q7gw3ShxBfwVS5Gn9CHeeZE2gqc2wf1thtQQaRzyB3q4OlMRI8WRdoPdVGk0W8foAN3CnKo-VS4KWJ3_SM_wxk/s1600-h/picture350.JPG"><img style="cursor:pointer; cursor:hand;width: 320px; height: 23px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhY5cIPZf_RYBk9yQfnLjyikzd1XAJUaUs0szhcfny_Ik_b0CGYRakb_q7gw3ShxBfwVS5Gn9CHeeZE2gqc2wf1thtQQaRzyB3q4OlMRI8WRdoPdVGk0W8foAN3CnKo-VS4KWJ3_SM_wxk/s320/picture350.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5340815845434664002" /></a><br /><br />Now, open calendar.js from location \OracleBI\oc4j_bi\j2ee\home\applications\analytics\analytics\res\b_mozilla, not from location \OracleBI\web\app\res\b_mozilla.<br /><br />Add a part of the code for adding leading zeros for days and months only. We add this inside the NQCSetDate function.<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhB6ZtZPSzzF9LsBzGRbLPIDYY_qioS25HGmsOlqY_28jPfN4t6GTTbYwrYsai5v49cCTjEiXxqkqIEFsJzvRMulZv6frhV46dz3Kni65C5s4DI8tPosfCjM8P4e9BKYfQsrQvlMn-WVt4/s1600-h/picture351.JPG"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5340810699277987666" style="WIDTH: 278px; CURSOR: hand; HEIGHT: 320px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhB6ZtZPSzzF9LsBzGRbLPIDYY_qioS25HGmsOlqY_28jPfN4t6GTTbYwrYsai5v49cCTjEiXxqkqIEFsJzvRMulZv6frhV46dz3Kni65C5s4DI8tPosfCjM8P4e9BKYfQsrQvlMn-WVt4/s320/picture351.JPG" border="0" /></span></a><span style="font-family:verdana;"><br /><br />Now you are able to see leading zeros in days and months, everytime. The length is always 2.</span>Goran Ockohttp://www.blogger.com/profile/16571461599213456839noreply@blogger.com0tag:blogger.com,1999:blog-196729317318279460.post-43981587850380900532009-05-11T10:51:00.003+02:002009-05-11T11:06:46.216+02:00OBIEE 10.1.3.4.1<span style="font-family:verdana;">I forgot to mention that the new version of OBIEE (10.1.3.4.1) is out for a while...<br /><br />Download available on: </span><a href="http://www.oracle.com/technology/software/products/ias/htdocs/101320bi.html"><span style="font-family:verdana;">http://www.oracle.com/technology/software/products/ias/htdocs/101320bi.html</span></a><span style="font-family:verdana;">.<br /><br />OBIEE 10341 First Impressions by John Minkjan:<br /></span><a href="http://obiee101.blogspot.com/2009/04/obiee-10341-first-impressions.html"><span style="font-family:verdana;">http://obiee101.blogspot.com/2009/04/obiee-10341-first-impressions.html</span></a><span style="font-family:verdana;">.</span>Goran Ockohttp://www.blogger.com/profile/16571461599213456839noreply@blogger.com0tag:blogger.com,1999:blog-196729317318279460.post-58637330345386950762009-04-23T08:49:00.002+02:002009-04-23T08:50:58.890+02:00Detecting all choices from dashboard prompts in Answers<span style="font-family:verdana;">If you are using <span style="color:#ff0000;">all choices</span> option in dashboard prompts and presentation variable, there is a way to detect this if you write a filter manualy (using convert filter to SQL option in Answers).<br /><br />Prompt:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRaLrBwL8KPgAiPqK_jnaGNVOCD7CZpposMhkwjIYDXnoVAW7iISQzstulOhx7n0aY-J1_7GmJTITcdeQOv77P4urp5r9fMWCdMlKFOV_oCo37NvlX-rgSvWe91dKXlNVVdpgH0X3AiB0/s1600-h/picture310.JPG"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5326694432516717794" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 25px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRaLrBwL8KPgAiPqK_jnaGNVOCD7CZpposMhkwjIYDXnoVAW7iISQzstulOhx7n0aY-J1_7GmJTITcdeQOv77P4urp5r9fMWCdMlKFOV_oCo37NvlX-rgSvWe91dKXlNVVdpgH0X3AiB0/s320/picture310.JPG" border="0" /></span></a><span style="font-family:verdana;"><br /><br />Report:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjjwNvEgabdExIjSGGrx_yEq5aWoKG9DcjTxnG8nZDVb0pUOdX1xLnrV6rfjM4a-TpT1NWBjewN-J007YHZBTmHTZ3WL_RrfO6ZN7WSb-wWW8Sw0tdDW22m-VPSu6jQ3nuQnJruACU0hQ/s1600-h/picture311.JPG"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5326700169601195634" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 156px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjjwNvEgabdExIjSGGrx_yEq5aWoKG9DcjTxnG8nZDVb0pUOdX1xLnrV6rfjM4a-TpT1NWBjewN-J007YHZBTmHTZ3WL_RrfO6ZN7WSb-wWW8Sw0tdDW22m-VPSu6jQ3nuQnJruACU0hQ/s320/picture311.JPG" border="0" /></span></a><span style="font-family:verdana;"><br /><br />Detecting all choices for heading:<br /><br />case when LENGTH('@{pv_char}')>0 then concat('Calendar month is ', '@{pv_char}') <span style="color:#ff0000;">else 'All choices'</span> end<br /><br />or you can write it like this:<br /><br /><span style="color:#ff0000;">case when LENGTH('@{pv_char}') is null then 'All choices'</span> else concat('Calendar year is ', '@{pv_char}') end<br /><br />Detecting all choices in filter:<br /><br />TIMES.CALENDAR_MONTH_DESC = ifnull('@{pv_char}',' ')<br />or<br /><span style="color:#ff0000;">ifnull('@{pv_char}',' ')=' '</span><br /><br />Put a heading in narrative view below tittle.<br /><br />Test (all choices):<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLTMP0Fxy-a2Z-n5Y8VaF0t0mdK6iOhr_kj7UaYGNpZ6h_D3-rK3U6Sax3-Jflt5nI5ipV_CDq6r0_2c3iXNvGkCl1z-mQZhv9iTS2VP0lHcMV02UM65w-FsDY4GbxIrhhdIAzO0UyvUE/s1600-h/picture312.JPG"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5326702803085186594" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 130px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLTMP0Fxy-a2Z-n5Y8VaF0t0mdK6iOhr_kj7UaYGNpZ6h_D3-rK3U6Sax3-Jflt5nI5ipV_CDq6r0_2c3iXNvGkCl1z-mQZhv9iTS2VP0lHcMV02UM65w-FsDY4GbxIrhhdIAzO0UyvUE/s320/picture312.JPG" border="0" /></span></a><span style="font-family:verdana;"><br /><br />NQQuery.log:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyPNNLcPm8feSFE7nDOxXj6g2dbLSZaP8S-nTvPNiPsknhnzBJ3Swa1yD6jJcw02_bqz9sZUU0MmRoKKJCxurmstzLTzxxZ278MbYkDb0ukQX0oOqZHI4m2PujewiyL0DO0wNV8PBEwVg/s1600-h/picture314.JPG"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5326728738127150130" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 137px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyPNNLcPm8feSFE7nDOxXj6g2dbLSZaP8S-nTvPNiPsknhnzBJ3Swa1yD6jJcw02_bqz9sZUU0MmRoKKJCxurmstzLTzxxZ278MbYkDb0ukQX0oOqZHI4m2PujewiyL0DO0wNV8PBEwVg/s320/picture314.JPG" border="0" /></span></a><span style="font-family:verdana;"><br /><br />Test (selected value):<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpMjh6za4PIjVS_FN0Nnw2qbRObKPrjjaBlHCnZ9ACwaZpJTI8g_Wn36mf1AOHCXeEIPAS0F6YaY-iMWAMOJQgSNx_A2XM8QLyaoXTKLoeRvXBl68aVeBwkmij46U2cTO5pUh0tY3qaRg/s1600-h/picture313.JPG"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5326707776430381522" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 85px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpMjh6za4PIjVS_FN0Nnw2qbRObKPrjjaBlHCnZ9ACwaZpJTI8g_Wn36mf1AOHCXeEIPAS0F6YaY-iMWAMOJQgSNx_A2XM8QLyaoXTKLoeRvXBl68aVeBwkmij46U2cTO5pUh0tY3qaRg/s320/picture313.JPG" border="0" /></span></a><span style="font-family:verdana;"><br /><br />NQQuery.log:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGgFq-GC-3QjCb_cL5gzUbc0dvSD7n6Djs7pnlhoegowFlclYgp37EYo7TW_LLYq-VPvWnUBiozDzYBhJ2qIZGFqRh3Ava6NvShkJ7qPvbrHU_Ym5JPw5GL7-aP9zDGxcCLE8XyMZz_AI/s1600-h/picture315.JPG"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5326729396562655522" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 119px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGgFq-GC-3QjCb_cL5gzUbc0dvSD7n6Djs7pnlhoegowFlclYgp37EYo7TW_LLYq-VPvWnUBiozDzYBhJ2qIZGFqRh3Ava6NvShkJ7qPvbrHU_Ym5JPw5GL7-aP9zDGxcCLE8XyMZz_AI/s320/picture315.JPG" border="0" /></span></a><span style="font-family:verdana;"><br /><br />The same is if you are using number column in dashboard prompt and variable pv_number, just replace pv_char with pv_number and CALENDAR_MONTH_DESC with CALENDAR_YEAR for example.</span>Goran Ockohttp://www.blogger.com/profile/16571461599213456839noreply@blogger.com4tag:blogger.com,1999:blog-196729317318279460.post-5530652135596621652009-04-20T19:00:00.009+02:002009-04-20T19:19:20.270+02:00Content Accelerator Framework V1 free utility set for OBIEE<span style="font-family:verdana;">This works only with OBIEE patch release 10.1.3.4.1 which has not been released yet.<br /><br />This tool is designed to help OBIEE developers to develop templates from any source to any target environment. Major use of this tool is that you can simply duplicate any reports or logical part in your repository RPD file from one environment to another. The only required thing here is that the target environment should have basic logical model within RPD.<br /><br />So if you like to clone a dashboard or report and all underlying objects to and want this to be very quickly you can use CAF V1. You can propagate all layers from dashboard level to RPD logical level just in few clicks.<br /><br />CAF V1 coverage:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvEQL6RO9oCMfC4FyEDcBBK6jZj_AftuF71_UzOzKGMc0iCk0BFZXg2fBs_jJXL1LanQw1WurjaW70VeEgDdz-rS_4RVMnHY6XoC-WHT6W9d9De-rl9AwWOWmW4iUiYCNCeOi4g2nFrXQ/s1600-h/picture317.JPG"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5326756807475202818" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 238px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvEQL6RO9oCMfC4FyEDcBBK6jZj_AftuF71_UzOzKGMc0iCk0BFZXg2fBs_jJXL1LanQw1WurjaW70VeEgDdz-rS_4RVMnHY6XoC-WHT6W9d9De-rl9AwWOWmW4iUiYCNCeOi4g2nFrXQ/s320/picture317.JPG" border="0" /></span></a><span style="font-family:verdana;"><br /><br />If you for example rename some objects in RPD your reports are broken because of new aliases in RPD and normally you would synchronize catalog manually, but this tool will synchronize all automatically.<br /><br /><span style="color:#ff0000;">*Note</span><br /></span><span style="font-family:verdana;"><span style="color:#ff0000;">CAF V1 cloner will clone all logical calculations and all Answers calculations.<br />CAF V1 cloner will not clone RPD objects that directly map to physical column or physical formula calculation.</span><br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgn5Mm4ed2wCQRFJ6mVG9f5gw7SDd4fUISz7SQaC8G1vjTKVF6PV0v098yHSn6Z3cxq3rsJpyEFICocF6b35DJCh2p-_f974SI6uAoG5K5Jr7de4ycrQe2VXFpSsMVfdyq8lLLEPrh6HEk/s1600-h/picture316.JPG"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5326755121842863730" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 70px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgn5Mm4ed2wCQRFJ6mVG9f5gw7SDd4fUISz7SQaC8G1vjTKVF6PV0v098yHSn6Z3cxq3rsJpyEFICocF6b35DJCh2p-_f974SI6uAoG5K5Jr7de4ycrQe2VXFpSsMVfdyq8lLLEPrh6HEk/s320/picture316.JPG" border="0" /></span></a><span style="font-family:verdana;"><br /><br />Oracle Business Intelligence Enterprise Edition on OTN:<br /><a href="http://www.oracle.com/technology/products/bi/enterprise-edition.html">http://www.oracle.com/technology/products/bi/enterprise-edition.html</a><br /><br />Download CAF utility:<br /><a href="http://download.oracle.com/technology/products/bi/files/OracleBIEE_CAFV1_Setup.zip">http://download.oracle.com/technology/products/bi/files/OracleBIEE_CAFV1_Setup.zip</a> </span><span style="font-family:verdana;"><br /><br />CAF documentation:<br /><a href="http://www.oracle.com/technology/products/bi/pdf/oraclebiee-cafv1-usage-instructions.pdf">http://www.oracle.com/technology/products/bi/pdf/oraclebiee-cafv1-usage-instructions.pdf</a> </span>Goran Ockohttp://www.blogger.com/profile/16571461599213456839noreply@blogger.com2tag:blogger.com,1999:blog-196729317318279460.post-59210892184725060102009-04-15T12:06:00.035+02:002009-04-20T19:09:26.339+02:00How to display description in the prompt and filter by id<span style="font-family:verdana;">There was a question on OTN forum </span><a href="http://forums.oracle.com/forums/thread.jspa?threadID=885967&tstart=15"><span style="font-family:verdana;">http://forums.oracle.com/forums/thread.jspa?threadID=885967&tstart=15</span></a><span style="font-family:verdana;"> how to display description in the dashboard prompt by selecting corresponding id and use it in filter. Maybe there is much easier solution then this so if someone knows please let me know.<br /><br />We will have only one dashboard prompt so there is no need to have two prompts, one for description and one for id and separate GO buttons. This example is based on displaying CALENDAR_YEAR and using CALENDAR_YEAR_ID in filter.<br /><br />This example only for a test purpose. So I didn't test performance.<br /><br />Make a dashboard prompt with CALENDAR_YEAR column:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZE8s0S0RcYrmvBI6UBJ_X6Ee6KxBnCoI5cW8gXSfmeg68C0UqkmEwE0Frt-6paSwcH_GWVgNGiTDrn8LHXvyDJNQoH0y9pPjw3n1JA91pI4vUAhxLmTzwghY354KRyDticVskblZMGiI/s1600-h/picture300.JPG"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5324869941660318386" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 30px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZE8s0S0RcYrmvBI6UBJ_X6Ee6KxBnCoI5cW8gXSfmeg68C0UqkmEwE0Frt-6paSwcH_GWVgNGiTDrn8LHXvyDJNQoH0y9pPjw3n1JA91pI4vUAhxLmTzwghY354KRyDticVskblZMGiI/s320/picture300.JPG" border="0" /></span></a><span style="font-family:verdana;"><br /><br />Answers report:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWCaX8N2Ee3aJlVDeIwsplJrrQEV-GK7SgFBE8fl8yJIri-lWkpjEE33r-ziBCK1eamIes5iNmHpfvhmqx37Oe2yPLs7UfSIGESWXblmu_9AK45PyRhgABWObRyAYdjYQ6iMPEqoNqOEU/s1600-h/picture301.JPG"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5324870416631139874" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 113px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWCaX8N2Ee3aJlVDeIwsplJrrQEV-GK7SgFBE8fl8yJIri-lWkpjEE33r-ziBCK1eamIes5iNmHpfvhmqx37Oe2yPLs7UfSIGESWXblmu_9AK45PyRhgABWObRyAYdjYQ6iMPEqoNqOEU/s320/picture301.JPG" border="0" /></span></a><span style="font-family:verdana;"><br /><br />You see this in filter on CALENDAR_YEAR_ID column:<br /><br />TIMES.CALENDAR_YEAR_ID = EVALUATE(<span style="color:#ff0000;">'GET_ID_FROM_DESC</span>(%1)' as double, @{pv_desc})<br /><br />I created GET_ID_FROM_DESC function in Oracle database (in my case I use HR and SH schema) and use it in EVALUATE function. This function returns CALENDAR_YEAR_ID for CALENDAR_YEAR as input.<br /><br />The function code:<br /><br />create or replace function get_id_from_desc(p_desc varchar2)<br />return number <span style="color:#ff0000;">DETERMINISTIC</span><br />is<br />v_id number;<br />begin<br />select distinct calendar_year_id into v_id from sh.times where calendar_year=p_desc;<br />dbms_output.put_line(v_id);<br />return v_id;<br />exception when others then null;<br />end;<br /><br />Maybe you'll need to create a function-based index on GET_ID_FROM_DESC(CALENDAR_YEAR), that's way I put DETERMINISTIC clause in function.<br /><br />I found this information about DETERMINISTIC clause in </span><a href="http://www.blogger.com/rwijk.blogspot.com/2008/04/deterministic-clause.html"><span style="font-family:verdana;">rwijk.blogspot.com/2008/04/deterministic-clause.html</span></a><span style="font-family:verdana;">:<br /><br />Specify DETERMINISTIC to indicate that the function returns the same result value whenever it is called with the same values for its arguments.<br /><br />You must specify this keyword if you intend to call the function in the expression of a function-based index or from the query of a materialized view that is marked REFRESH FAST or ENABLE QUERY REWRITE. When Oracle Database encounters a deterministic function in one of these contexts, it attempts to use previously calculated results when possible rather than reexecuting the function. If you subsequently change the semantics of the function, then you must manually rebuild all dependent function-based indexes and materialized views.<br /><br />If you not specify DETERMINISTIC clause when you try to create function-based index you'll get an error:<br /><br />ORA-30553: The function is not deterministic<br /><br />So if you need, create function-based index on GET_ID_FROM_DESC(CALENDAR_YEAR):<br /><br />create index times_fnc_idx1 on sh.times(hr.GET_ID_FROM_DESC(calendar_year));<br /><br />Make a dashboard page and test report:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlaU06uMLYig_56aAdlux0lraKtiPxjf7zR-zT5Yq-lYc_3HiT1tRTi7aUuiEQYgZlLBv3V00lGT11SNWu4Ujy1MU7GyJ0f0utaN1ryDdyTj7l724P0px9X-c9pgANPQuK6IV-Pq-wImw/s1600-h/picture302.JPG"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5324877563591684130" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 196px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlaU06uMLYig_56aAdlux0lraKtiPxjf7zR-zT5Yq-lYc_3HiT1tRTi7aUuiEQYgZlLBv3V00lGT11SNWu4Ujy1MU7GyJ0f0utaN1ryDdyTj7l724P0px9X-c9pgANPQuK6IV-Pq-wImw/s320/picture302.JPG" border="0" /></span></a><span style="font-family:verdana;"><br /><br />NQQuery.log:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhq59_RoCbuQWRt_bv1K9gD_sPyIH-W2V3RnxLd8VUKYhNK1kjZHB1VgnsFeSsJbmuV3deQb-DB8aTW18ZM0CtHRwu5hL42FtWEqfOjVVlKpdwHOD_RyW86DjjQs2fIC3rmANx9thSrYQc/s1600-h/picture303.JPG"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5324879609599746178" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 112px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhq59_RoCbuQWRt_bv1K9gD_sPyIH-W2V3RnxLd8VUKYhNK1kjZHB1VgnsFeSsJbmuV3deQb-DB8aTW18ZM0CtHRwu5hL42FtWEqfOjVVlKpdwHOD_RyW86DjjQs2fIC3rmANx9thSrYQc/s320/picture303.JPG" border="0" /></span></a><span style="font-family:verdana;"><br /><br />select T20553.CALENDAR_YEAR as c1,<br />sum(T20550.AMOUNT_SOLD) as c2<br />from<br />TIMES T20553,<br />SALES T20550<br />where (T20550.TIME_ID = T20553.TIME_ID<br />and T20553.CALENDAR_YEAR_ID = GET_ID_FROM_DESC(2000))<br />group by T20553.CALENDAR_YEAR<br />order by c1<br /><br />Example in this post was about how to choose description column from a dashboard and use id column in filter. Replace this example with your real case and test performance.</span>Goran Ockohttp://www.blogger.com/profile/16571461599213456839noreply@blogger.com1tag:blogger.com,1999:blog-196729317318279460.post-72324434824900687212009-04-14T10:53:00.021+02:002009-04-14T12:55:31.719+02:00Using presentation variable from the first dashboard prompt as filter in the second dashboard prompt<span style="font-family:verdana;">There was a question on OTN forum<br /></span><a href="http://forums.oracle.com/forums/thread.jspa?threadID=884660&tstart=0"><span style="font-family:verdana;">http://forums.oracle.com/forums/thread.jspa?threadID=884660&tstart=0</span></a><span style="font-family:verdana;"> on how to filter second dashboard prompt which use EVALUATE function with presentation variable which is populated from the first dashboard prompt.<br /><br />Here is the solution with POWER function in EVALUATE.<br /><br />First dashboard prompt:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVnbMKHmR47CrkNvkJbVTaR0sRHFhdKOWU4MQJW50IMeB_D6srIOPoQzJbbQzxFoZBxnqvBQjM0E4RpUhyphenhypheng_5tBCSzncn4GXz-Z1wWvXtahhlf2Oa8TgCOKSKp41c6LOP_9-GdxDOiw5k/s1600-h/picture290.JPG"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5324471554930068082" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 27px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVnbMKHmR47CrkNvkJbVTaR0sRHFhdKOWU4MQJW50IMeB_D6srIOPoQzJbbQzxFoZBxnqvBQjM0E4RpUhyphenhypheng_5tBCSzncn4GXz-Z1wWvXtahhlf2Oa8TgCOKSKp41c6LOP_9-GdxDOiw5k/s320/picture290.JPG" border="0" /></span></a><span style="font-family:verdana;"><br /><br />Second dashboard prompt:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjiFLvZqlLXAdyNYJC1TmLDShWXpWrk6lzn-2NwHFMoDMtsC9gr74m3cp2dNj0-uw2ktqe1uAjkLJfwj26e0Rl_h-ZSFTQ5WQMC2_ziY-PPghoHTcLe8aIWVCvanH1-h0vQFsmfIJ4oNuc/s1600-h/picture291.JPG"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5324473492456612882" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 36px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjiFLvZqlLXAdyNYJC1TmLDShWXpWrk6lzn-2NwHFMoDMtsC9gr74m3cp2dNj0-uw2ktqe1uAjkLJfwj26e0Rl_h-ZSFTQ5WQMC2_ziY-PPghoHTcLe8aIWVCvanH1-h0vQFsmfIJ4oNuc/s320/picture291.JPG" border="0" /></span></a><span style="font-family:verdana;"><br /><br />Edit column formula:<br /><br />case when 1=2 then TIMES.CALENDAR_MONTH_ID<br />else<br />EVALUATE('POWER(%1, %2)',@{pv_test}{2},@{pv_test}{3})<br />end<br /><br />If you write this instead of the code above:<br /><br />case when 1=2 then TIMES.CALENDAR_MONTH_DESC<br />else<br />cast(EVALUATE('POWER(%1, %2)',@{pv_test}{2},@{pv_test}{3}) as char)<br />end<br /><br />then you cannot use decimal numbers in edit-box of the first dashboard prompt to populate POWER function. So do not use cast as char for this solution, leave it in number format.<br /><br />Test:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCfH5ybBlGyD-CHum1nAzFsIDanEqF_v9D43b7DAEUOc9GKkHiszkAz6gQNd6pcsWIppOyS_d_mYhyphenhyphenLi-2kjwtGC5K8onq_LylaRi0Ayp4VjiqHwj-oon_QM86pzEKTANJeuD9bg0dviA/s1600-h/picture292.JPG"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5324475619776688066" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 117px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCfH5ybBlGyD-CHum1nAzFsIDanEqF_v9D43b7DAEUOc9GKkHiszkAz6gQNd6pcsWIppOyS_d_mYhyphenhyphenLi-2kjwtGC5K8onq_LylaRi0Ayp4VjiqHwj-oon_QM86pzEKTANJeuD9bg0dviA/s320/picture292.JPG" border="0" /></span></a><span style="font-family:verdana;"><br /><br />At initial start, the presentation variable pv_test is 0 and default values are used:<br /><br />cast(EVALUATE('POWER(%1, %2)',@{pv_test}{<strong>2</strong>},@{pv_test}{<strong>3</strong>}) as char).<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibAf-SCEcmsFNLgVuwLVGWnVU6GteO8hY-OwmRssDc7rNfr0lTO8n1x2b5_Uo4juHtVOkr0lLFtxoPsmDlJepMP6S5EpQCQGosohGE5tUhgAHb-SPMRBhLCXS6n_4n8QVqcrh__LiQKz8/s1600-h/picture293.JPG"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5324477140350087586" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 153px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibAf-SCEcmsFNLgVuwLVGWnVU6GteO8hY-OwmRssDc7rNfr0lTO8n1x2b5_Uo4juHtVOkr0lLFtxoPsmDlJepMP6S5EpQCQGosohGE5tUhgAHb-SPMRBhLCXS6n_4n8QVqcrh__LiQKz8/s320/picture293.JPG" border="0" /></span></a><span style="font-family:verdana;"><br /><br />If we remove default values from code and leave just:<br /><br />cast(EVALUATE('POWER(%1, %2)',@{pv_test},@{pv_test}) as char)<br /><br />zero (0) is polulated from pv_test and the result of POWER(0, 0) is 1:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijAvdrlQur-cYA_NfiSJdGzJ4v3E08XjCPI5grgaaxYamb49tGYBYOQtGHzDKTTBw5soeZq7OfsDaldDxSg118mU8OQfvo_3EK6QyfADUze9fAk3Y6SnBluj4-SivMOuLk7_dxipvL2EM/s1600-h/picture294.JPG"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5324477811399530450" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 153px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijAvdrlQur-cYA_NfiSJdGzJ4v3E08XjCPI5grgaaxYamb49tGYBYOQtGHzDKTTBw5soeZq7OfsDaldDxSg118mU8OQfvo_3EK6QyfADUze9fAk3Y6SnBluj4-SivMOuLk7_dxipvL2EM/s320/picture294.JPG" border="0" /></span></a><span style="font-family:verdana;"><br /><br />Decimal numbers test:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDeKxAV_pKFX-9MFFMfzUDX3ndMkkyZPOOpnVnWXekloadCZd7ecucdbYkRGIWgfIxJcNa2h-bjm3-uak0kkmqRdD7BYN1zD_n_xcH3KQC8FOT2BJkf3fbXgg91q5aavmQREaQIUepCCY/s1600-h/picture295.JPG"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5324478591996124258" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 157px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDeKxAV_pKFX-9MFFMfzUDX3ndMkkyZPOOpnVnWXekloadCZd7ecucdbYkRGIWgfIxJcNa2h-bjm3-uak0kkmqRdD7BYN1zD_n_xcH3KQC8FOT2BJkf3fbXgg91q5aavmQREaQIUepCCY/s320/picture295.JPG" border="0" /></span></a><span style="font-family:verdana;"> </span><br /><br />This works fine.Goran Ockohttp://www.blogger.com/profile/16571461599213456839noreply@blogger.com1tag:blogger.com,1999:blog-196729317318279460.post-23106111791089397022009-04-02T16:00:00.011+02:002009-04-06T14:01:32.124+02:00Changing date format mask in javascript for calendar dashboard prompt<span style="font-family:verdana;">There was a question for me how we can change the date format mask when we choose a value from a calendar. It always shows date in format d.m.yyyy no mather what settings we have in localedefinitions.xml files. Only date order and date separator is populated from localdefinitions.xml (example, dateOrder is dmy and dateSeparator is -). So if you have been read my previous posts </span><a href="http://108obiee.blogspot.com/2009/03/how-to-change-date-format-mask-in-date.html"><span style="font-family:verdana;">How to change date format mask in date dashboard prompts - drop-down list and calendar</span></a><span style="font-family:verdana;"> and </span><a href="http://108obiee.blogspot.com/2009/03/date-between-in-filter-and-title-when.html"><span style="font-family:verdana;">Date between in filter and title when using presentation variable from calendar dashboard prompt or drop-down list in OBIEE</span></a><span style="font-family:verdana;"> you know that we used d.m.yyyy date format in calendar for selecting value from it, for default value from a repository variable and for parsing into presentation variable.<br /><br />Javascripts are used for calendar prompts. To see which scripts are used here you must open your calendar dashboard prompt and see the source that is generated with view source. This will give you the order of scripts that are executed.<br /><br />What now if I want to change date format mask in calendar so that it shows me for example 1-Jan-2009 format when I take a value from it? And also I want 1-Jan-2009 format to be the first value (default, from a repository variable) when I start this prompt.<br /><br /><strong>Step 1 - default repository variable from initialization block</strong><br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBpGdHYacjC-puHT9Qpz3IzcBNkhwfBHboB2gd7USWByTTApQRuI-n5WjrFw0OSJ0v3nxW-FOJd7UmWAYLAjV7krWncAqblTlh9qF0dQO6re5FcQRpnDEzfL0YT4QrjG1hDkAWwTrXhUQ/s1600-h/picture274.JPG"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5320059583781759506" style="WIDTH: 303px; CURSOR: hand; HEIGHT: 124px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBpGdHYacjC-puHT9Qpz3IzcBNkhwfBHboB2gd7USWByTTApQRuI-n5WjrFw0OSJ0v3nxW-FOJd7UmWAYLAjV7krWncAqblTlh9qF0dQO6re5FcQRpnDEzfL0YT4QrjG1hDkAWwTrXhUQ/s320/picture274.JPG" border="0" /></span></a><span style="font-family:verdana;"><br /><br />Leave this as in previous posts, default date is in character format dd.mm.yyyy and OBIEE will do implicit conversion to a date format which we have defined in dateShortFormat in localedefinitions.xml.<br /><br /><strong>Step 2 - localedefinitions.xml</strong><br /><br />Depends on our locale settings these entries need to be modified:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBQ3xROma9VFyi_L3OWIXQGohX1qR0dJyyRdJRaSsavpwDe54Q1JKBm3Dez36-m_ybvOSnW4sKB6FVmfcCa1zrFvxqy6woEs3BVjjR6cs_QUpY00FMM_umyFa38fyCr4HOxoFlxIshMcQ/s1600-h/picture275.JPG"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5320064651044892050" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 65px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBQ3xROma9VFyi_L3OWIXQGohX1qR0dJyyRdJRaSsavpwDe54Q1JKBm3Dez36-m_ybvOSnW4sKB6FVmfcCa1zrFvxqy6woEs3BVjjR6cs_QUpY00FMM_umyFa38fyCr4HOxoFlxIshMcQ/s320/picture275.JPG" border="0" /></span></a><span style="font-family:verdana;"><br /><br />dateShortFormat -> d-MMM-yyyy<br /><br />This format is for default values.<br /><br />dateSeparator -> -<br /><br />This separator we expect after picking up the value from a calendar.<br /><br />dateOrder -> dmy (like in previous posts)<br /><br />This date order we expect after picking up the value from a calendar<br /><br /><strong>Step 3 - view prompt source</strong><br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGODxC1JtmPnF9DhNBaE4GXwiwZ6Acr4KE_haJRDSgvm_snw87Qwb23MVInf_Me-6HNuVwhVYJKvIThSam_0QJ4qWlGQoPq7sYFJJT21pQIC7hrd203eQLRH-p_7nGQzG8ICbA8RpVWog/s1600-h/picture276.JPG"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5320066356094428402" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 208px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGODxC1JtmPnF9DhNBaE4GXwiwZ6Acr4KE_haJRDSgvm_snw87Qwb23MVInf_Me-6HNuVwhVYJKvIThSam_0QJ4qWlGQoPq7sYFJJT21pQIC7hrd203eQLRH-p_7nGQzG8ICbA8RpVWog/s320/picture276.JPG" border="0" /></span></a><span style="font-family:verdana;"><br /><br />Date short format, date order and short month names:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg17W0tMKWTuuW0ukjgiicQwA83-U0Zfso8oIjNHP99f6qEWDSu5jpTGEEUKtoXXblNUSPUuVtLi-2n7Axt2elUBQ5KjPn1bsoH6hU2pM_76gZgKlJXYej6lnFg5hYMWhD-MrNLEtI5nn0/s1600-h/picture277.JPG"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5320068597356585522" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 43px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg17W0tMKWTuuW0ukjgiicQwA83-U0Zfso8oIjNHP99f6qEWDSu5jpTGEEUKtoXXblNUSPUuVtLi-2n7Axt2elUBQ5KjPn1bsoH6hU2pM_76gZgKlJXYej6lnFg5hYMWhD-MrNLEtI5nn0/s320/picture277.JPG" border="0" /></span></a><span style="font-family:verdana;"><br /><br />NQCShowCalendar function (on click):<br /><br />NQCShowCalendar<br />(<br />document.getElementById('saw_11_6'),<br />document.getElementById('saw_11_4'),<br />null,<br />null,<br />false,<br />null,<br /><strong>nqcalmns</strong>,<br />nqdfmt,<br />nqdsep);<br /><br /><strong>Step 4 - modify calendar.js javascript file to show a month abbreviation instead of month number</strong><br /><br />We use calendar.js from location <span style="color:#999999;">\OracleBI\oc4j_bi\j2ee\home\applications\analytics\analytics\res\b_mozilla</span>, not from location <span style="color:#999999;">\OracleBI\web\app\res\b_mozilla</span>.<br /><br />These are default values and they are populated in NQCShowCalendar function:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0QWS390yK900EwJVfSaizAcFUReBL5wM-Y-J6QY-5K4al-Q5tuV30XkAsfGnlnj-pi3R5Pd_2Retkw8edsMTXkiScEch4DfF13fJ11qs7D_Xj0Ou72BSvOjPaf_I2oLJhchyphenhyphen3rOHEEI0/s1600-h/picture278.JPG"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5320070207941067202" style="WIDTH: 208px; CURSOR: hand; HEIGHT: 190px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0QWS390yK900EwJVfSaizAcFUReBL5wM-Y-J6QY-5K4al-Q5tuV30XkAsfGnlnj-pi3R5Pd_2Retkw8edsMTXkiScEch4DfF13fJ11qs7D_Xj0Ou72BSvOjPaf_I2oLJhchyphenhyphen3rOHEEI0/s320/picture278.JPG" border="0" /></span></a><span style="font-family:verdana;"><br /><br />RgMN array is populated with nqcalmns=new Array('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec') which we see in view source. Nqcalmns depends on locale settings (login language, localedefinitions.xml):<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTcEokl0_wB8Wmfy1wIEXUHn_X1Slb4bo1-qlT2bnBLITVeEAs0vTRxh6BlvxMP0ZCeJVVIs1rynL-xckip458BE4P3TREsYW1mrbGChT39ZHR9PeLkWQDTUC8jEjuS1THpWpbbpD6pqw/s1600-h/picture279.JPG"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5320071179139520290" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 267px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTcEokl0_wB8Wmfy1wIEXUHn_X1Slb4bo1-qlT2bnBLITVeEAs0vTRxh6BlvxMP0ZCeJVVIs1rynL-xckip458BE4P3TREsYW1mrbGChT39ZHR9PeLkWQDTUC8jEjuS1THpWpbbpD6pqw/s320/picture279.JPG" border="0" /></span></a><span style="font-family:verdana;"><br /><br />We need to call rgMN array in NQCSetDate function so we modify current code with the new <strong><span style="color:#ff0000;">one</span></strong> (just put in comment old part of the code):<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6z0Yb-E3V8ymaE_sw9ztAvohgvCWrKhAk8iHEpf_SIWthQRptSfHQARL8RVsEB_1o8rctdGDbX3XXnv8qNQKSlcZegh0zY1j3yta2Ss1xgoz6mcFOWaBjJfIYJNI2Cj487fWxaoX93ak/s1600-h/picture280.JPG"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5320072360747818818" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 307px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6z0Yb-E3V8ymaE_sw9ztAvohgvCWrKhAk8iHEpf_SIWthQRptSfHQARL8RVsEB_1o8rctdGDbX3XXnv8qNQKSlcZegh0zY1j3yta2Ss1xgoz6mcFOWaBjJfIYJNI2Cj487fWxaoX93ak/s320/picture280.JPG" border="0" /></span></a><span style="font-family:verdana;"><br /><br /><strong>Step 5 - save, restart presentation service and test</strong><br /><br />I made a dashboard page with report in Answers and a calendar dashboard prompt:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWHpedvhf9ghIoR47XHdjk7OTfrmoKrgaFQrvI-3Byt6le0Rkuyz-pUljkDX7FYUXD5Img4r44ywFggExcjgxvp4nU9yuxGNREwTUrPz2AE7ph3tpqxFgIRVw8c-gOwn-SVVu_Ia88sIk/s1600-h/picture281.JPG"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5320086616383352498" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 26px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWHpedvhf9ghIoR47XHdjk7OTfrmoKrgaFQrvI-3Byt6le0Rkuyz-pUljkDX7FYUXD5Img4r44ywFggExcjgxvp4nU9yuxGNREwTUrPz2AE7ph3tpqxFgIRVw8c-gOwn-SVVu_Ia88sIk/s320/picture281.JPG" border="0" /></span></a><span style="font-family:verdana;"><br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJFRiIB1kKbStMqqyGpgvOLhNjHsywpl-5SJisUPnUL-CuGhXPlMCk50lxEWPB-SRWYtwHd638fbzcTW3TiHxQt5XoZD77WMcjplaDeAEvgQiAlNkW7tMiYDZwsf8UFD_PXgMqsM-6BAw/s1600-h/picture282.JPG"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5320086684597737298" style="WIDTH: 306px; CURSOR: hand; HEIGHT: 203px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJFRiIB1kKbStMqqyGpgvOLhNjHsywpl-5SJisUPnUL-CuGhXPlMCk50lxEWPB-SRWYtwHd638fbzcTW3TiHxQt5XoZD77WMcjplaDeAEvgQiAlNkW7tMiYDZwsf8UFD_PXgMqsM-6BAw/s320/picture282.JPG" border="0" /></span></a><span style="font-family:verdana;"><br /><br />I put here in filter 1-<span style="color:#999999;">Jan</span>-1999 as default value so I need to alter session to a English language because my database is in Croatian. This I'll do in Administrator:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgx8e1RXJuzq9ZnN0HesxQSp6V1u4S7hFEV8v8dBvXLbcBq-bYLhswqG-GBRuZ3D8TnNh2rzuXXPCGMEEvAPrJsWGq3qPVFQ4KrHPiBcg2JKJEIBP8J3RFS8BuC3UuxvKw3KROsn7LyrP0/s1600-h/picture283.JPG"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5320087256249734498" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 250px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgx8e1RXJuzq9ZnN0HesxQSp6V1u4S7hFEV8v8dBvXLbcBq-bYLhswqG-GBRuZ3D8TnNh2rzuXXPCGMEEvAPrJsWGq3qPVFQ4KrHPiBcg2JKJEIBP8J3RFS8BuC3UuxvKw3KROsn7LyrP0/s320/picture283.JPG" border="0" /></span></a><span style="font-family:verdana;"><br /><br />Initial start (prompt is filled with repository variable):<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQ3hdvSWXZk4SPvz2wlEZIH_kMMcNqs8Ndq2kZBNTPcJJ2_KEUrSwduvHgpi-eODRiUPUjtlXXyRgpSBv9VaaVwCMLz-RUNC3VgS3Hw3L60NM2pWoBkLonj1qBXJTAfRhIZ4oqzgibMnU/s1600-h/picture284.JPG"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5320090304287282706" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 167px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQ3hdvSWXZk4SPvz2wlEZIH_kMMcNqs8Ndq2kZBNTPcJJ2_KEUrSwduvHgpi-eODRiUPUjtlXXyRgpSBv9VaaVwCMLz-RUNC3VgS3Hw3L60NM2pWoBkLonj1qBXJTAfRhIZ4oqzgibMnU/s320/picture284.JPG" border="0" /></span></a><span style="font-family:verdana;"><br /><br />NQQuery.log:<br /><br /><span style="color:#ff0000;">*Note that at initial dashboard start, the default 01.01.1999 is going directly into presentation variable so that's way we see it in SQL in NQQuery.log. After we pick up a new date from a calendar or refresh the same we will see new format in NQQuery.log (1-Jan-1999).</span></span><br /><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0OXUNZ-89JFpeVa7HPirVtQ7mg9RSaWBjU-_hyphenhyphen6u0W2-sf17ezSrSebWZSJHxw_ZdVXItTD5KARB6PRJLeVEcA3oqDC-nwZ7Qx68_ANGbqvM9ZpQxAymD417wYB2X2waUjic8TpLN8-4/s1600-h/picture288.JPG"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5320099428502543330" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 100px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0OXUNZ-89JFpeVa7HPirVtQ7mg9RSaWBjU-_hyphenhyphen6u0W2-sf17ezSrSebWZSJHxw_ZdVXItTD5KARB6PRJLeVEcA3oqDC-nwZ7Qx68_ANGbqvM9ZpQxAymD417wYB2X2waUjic8TpLN8-4/s320/picture288.JPG" border="0" /></span></a><span style="font-family:verdana;"><br /><br />Choosing another date from a calendar:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKcS-k-2HyhfNcOGzFulEm8jPWhR1Sd9p3r8Bpb1yVF-Hr-_qYYLD_6L7ayKk9BCpSWUDPdhv5b-_QmLj8FLWial4XzSXFr8bXQ5tmiXMdu0AalFaZdU81C6TKGlvl9s4SzKKfJTDZsnE/s1600-h/picture286.JPG"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5320091886933261794" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 172px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKcS-k-2HyhfNcOGzFulEm8jPWhR1Sd9p3r8Bpb1yVF-Hr-_qYYLD_6L7ayKk9BCpSWUDPdhv5b-_QmLj8FLWial4XzSXFr8bXQ5tmiXMdu0AalFaZdU81C6TKGlvl9s4SzKKfJTDZsnE/s320/picture286.JPG" border="0" /></span></a><span style="font-family:verdana;"><br /><br />NQQuery.log:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6Lcok6847XEqvnoMBHiORXZsVrTY0MK3oVjiKE4BIMjlYZJezwly8U_cDug8mHSQuYurH9fgIZMuRxQZe_8U6HU0__Z_yQ4jlW0-5iCHRlQ8ZMIR6zrWGBlR_wyK8NSBAlBb23VRhTTc/s1600-h/picture287.JPG"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5320092642259019890" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 106px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6Lcok6847XEqvnoMBHiORXZsVrTY0MK3oVjiKE4BIMjlYZJezwly8U_cDug8mHSQuYurH9fgIZMuRxQZe_8U6HU0__Z_yQ4jlW0-5iCHRlQ8ZMIR6zrWGBlR_wyK8NSBAlBb23VRhTTc/s320/picture287.JPG" border="0" /></span></a><span style="font-family:verdana;"><br /><br />If you run all these statements in database:<br /><br /><span style="color:#ff0000;">select 1 from times where time_id='6-Jan-1999'--our example</span><br />select 1 from times where time_id='06-Jan-1999'<br />select 1 from times where time_id='6-JAN-1999'<br />select 1 from times where time_id='06-JAN-1999'<br />select 1 from times where time_id='6-jan-1999'<br />select 1 from times where time_id='06-jan-1999'<br /><br />you can see that in all cases Oracle use TIMES_PK index, so implicit conversion char to date is present according to NLS settings in session/database.<br /></span><br /><span style="font-family:verdana;">if someone knows easier way to change month number to a month abbrevation for a calendar date prompt like I described in this post or to any other format p</span><span style="font-family:verdana;">lease let me know.</span><br /><span style="font-family:Verdana;"></span><br /><span style="font-family:Verdana;">You can change date order and separator from a localedefinitions.xml but it's not what we want to (for example 1.1.1999, 1/1/1999, 1999/1/1, 1999-1-1, etc).</span>Goran Ockohttp://www.blogger.com/profile/16571461599213456839noreply@blogger.com3tag:blogger.com,1999:blog-196729317318279460.post-34528710224828229492009-03-31T14:20:00.009+02:002009-04-06T14:02:19.926+02:00Date between in filter and title when using presentation variable from calendar dashboard prompt or drop-down list in OBIEE<span style="font-family:verdana;">In my previous post </span><a href="http://108obiee.blogspot.com/2009/03/how-to-change-date-format-mask-in-date.html"><span style="font-family:verdana;">how to change date format mask in date dashboard prompts - drop-down list and calendar</span></a><span style="font-family:verdana;"> I showed my solution of date format problem when using drop-down list and calendar dashboard prompt and repository variable as default. I use same prompts and localedefinitions.xml settings as in my previous post.<br /><br />Now we need to create a report in Answers and then show date prompts in report title. First we use a calendar prompt for input which is in d.m.yyyy format and later in drop-down prompt which is in dd.mm.yyyy format. According to input formats our output format will be the same for both calendar and drop-down list and will be something like Amount sold from date dd.mm.yyyy to date dd.mm.yyyy. You can see that although we have two different date formats as inputs (d.m.yyyy for calendar and dd.mm.yyyy for drop-down list) there is only one format in title (dd.mm.yyyy) and it is with leading zeros for date and months values.<br /><br /><strong>Example 1 - using calendar date prompts in filter and report title</strong><br /><br />Dashboard prompts:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnp5Fbye3c2pBK-XpLYB_AI0mbNGSSNcmPzOSDFgZ1GlrKrVQg8qPL14UjOzkzFKeUUBKOt5G7C5Yyweu7TkD-Pxac31HZnCIk88tj-GPDpFytbgn7ew_e9mW_irwqJT5e0A6obN9XZsE/s1600-h/picture260.JPG"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5319280868761913042" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 114px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnp5Fbye3c2pBK-XpLYB_AI0mbNGSSNcmPzOSDFgZ1GlrKrVQg8qPL14UjOzkzFKeUUBKOt5G7C5Yyweu7TkD-Pxac31HZnCIk88tj-GPDpFytbgn7ew_e9mW_irwqJT5e0A6obN9XZsE/s320/picture260.JPG" border="0" /></span></a><span style="font-family:verdana;"><br /><br />Column formula for the first calendar date prompt:<br /><br />case when 1=2 then TIMES.TIME_ID else cast ('1.1.1900' as date) end<br /><br />and for the second:<br /><br />case when 1=2 then TIMES.TIME_ID else cast ('1.1.2900' as date) end<br /><br />Column formula for drop-down list date from field:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdK-KR9VJwQ8vg-dM0qx-LV0UFQ9h2DB5vMWz5a5GU3TrWHhqmUU9gr_5Gv2ZCjAsBBZH75L17_E49uGs86mAkM_OT5Pli0-tSv5DlMA7IPwaM2XMCuYWU2_2oZCSD-VRXckv3Gy37p7M/s1600-h/picture273.JPG"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5319334241712875858" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 217px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdK-KR9VJwQ8vg-dM0qx-LV0UFQ9h2DB5vMWz5a5GU3TrWHhqmUU9gr_5Gv2ZCjAsBBZH75L17_E49uGs86mAkM_OT5Pli0-tSv5DlMA7IPwaM2XMCuYWU2_2oZCSD-VRXckv3Gy37p7M/s320/picture273.JPG" border="0" /></span></a><span style="font-family:verdana;"><br /><br />Column formula for drop-down list date to field is:<br /><br />EVALUATE('TO_CHAR(%1,%2)' as varchar(20),TIMES.TIME_ID,'dd.mm.yyyy')<br /><br />For this example we use only calendar prompts.<br /><br />We created columns in Answers as in picture:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhn9tOSEfqvtvZ6hW3VW_RejbMaRo5cc9NzEHlnBxBT3gVCANSORb8VRwxXSCSQ3Eo71lMBIunhtoEq603QQ16W0KpZFYwCdYl1HTLh8S-k-8Af1Tq70ojMfptOLD12N2_BdJ3XLIQ-KwY/s1600-h/picture261.JPG"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5319281106387988914" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 25px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhn9tOSEfqvtvZ6hW3VW_RejbMaRo5cc9NzEHlnBxBT3gVCANSORb8VRwxXSCSQ3Eo71lMBIunhtoEq603QQ16W0KpZFYwCdYl1HTLh8S-k-8Af1Tq70ojMfptOLD12N2_BdJ3XLIQ-KwY/s320/picture261.JPG" border="0" /></span></a><span style="font-family:verdana;"><br /><br /><strong><span style="color:#999999;">Amount sold</span></strong> -> SALES.AMOUNT_SOLD<br /><br /><strong><span style="color:#999999;">p_date_from</span></strong> -> '@{p_date_from}'<br /><br />original presentation variable date from p_date_from from a calendar<br /><br /><strong><span style="color:#999999;">p_date_to</span></strong> -> '@{p_date_to}'<br /><br />original presentation variable date to p_date_to from a calendar<br /><br /><strong><span style="color:#999999;">Variable length</span></strong> -><br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPkFKYt2gkXwYlBgMGPaFtqEwR56j62lRx9NW4s3kDZtWmLe_DXbETOjoL1xNkx34A1M_DF6G30qSP4ILadyBz8ib2kYQ4P_nMDxNT23VJuUzv3PWLMmnAe7ZfpHAz1BSe_dedOjK_ntk/s1600-h/picture263.JPG"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5319281922728983810" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 219px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPkFKYt2gkXwYlBgMGPaFtqEwR56j62lRx9NW4s3kDZtWmLe_DXbETOjoL1xNkx34A1M_DF6G30qSP4ILadyBz8ib2kYQ4P_nMDxNT23VJuUzv3PWLMmnAe7ZfpHAz1BSe_dedOjK_ntk/s320/picture263.JPG" border="0" /></span></a><span style="font-family:verdana;"><br /><br /><strong><span style="color:#999999;">Title date from in dd.mm.yyyy format</span></strong> -><br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUUm93OPxhNhdGKLS3WzNOEfmHGxknMl5vghT9laeFCDACwGN9_u-U_lU0ohQ7E2TDtR7wrIJpbqPqkAwNAeFY9rDxRAEPINkHZivZGNJ3pZcUk_Cj3vjfL2zjqaE6bwNBAwJBrJCg7Kg/s1600-h/picture262.JPG"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5319281185916179650" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 219px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUUm93OPxhNhdGKLS3WzNOEfmHGxknMl5vghT9laeFCDACwGN9_u-U_lU0ohQ7E2TDtR7wrIJpbqPqkAwNAeFY9rDxRAEPINkHZivZGNJ3pZcUk_Cj3vjfL2zjqaE6bwNBAwJBrJCg7Kg/s320/picture262.JPG" border="0" /></span></a><span style="font-family:verdana;"><br /><br /><span style="color:#ff0000;">*This case always returns dd.mm.yyyy date format</span><br /><br /><strong><span style="color:#999999;">Title date to in dd.mm.yyyy format</span></strong> -><br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdXQcVVJZVT6VcOqUrh1x0EzNHZYo9bIFL0odxcGWUrHbwYXtahmctuUr7wSoI73aDtSXXqtq9I9jnv_htolOJxIkh-93IxwSJUsqygxkAlUyvKc05q8OS1V3b0pv008UQkUmstl7UYsI/s1600-h/picture264.JPG"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5319283720159697794" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 218px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdXQcVVJZVT6VcOqUrh1x0EzNHZYo9bIFL0odxcGWUrHbwYXtahmctuUr7wSoI73aDtSXXqtq9I9jnv_htolOJxIkh-93IxwSJUsqygxkAlUyvKc05q8OS1V3b0pv008UQkUmstl7UYsI/s320/picture264.JPG" border="0" /></span></a><span style="font-family:verdana;"><br /><br /><span style="color:#ff0000;">*This case always returns dd.mm.yyyy date format</span><br /><br />We add filter on TIMES.TIME_ID column:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZ7nsbS8ycxCwpgHDJLFuJ-H5doY1hSRlARhFCwBoEYuyEshCcRI5ha8Kwj1lG33i8fFa7DQrhRItR_6a4EkIyjm1NNx2s5VirzCrSAnHBybvu_bKhtc-ii8nJAkG1H3DAr6OESEkICco/s1600-h/picture265.JPG"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5319284874890642850" style="WIDTH: 295px; CURSOR: hand; HEIGHT: 320px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZ7nsbS8ycxCwpgHDJLFuJ-H5doY1hSRlARhFCwBoEYuyEshCcRI5ha8Kwj1lG33i8fFa7DQrhRItR_6a4EkIyjm1NNx2s5VirzCrSAnHBybvu_bKhtc-ii8nJAkG1H3DAr6OESEkICco/s320/picture265.JPG" border="0" /></span></a><span style="font-family:verdana;"><br /><br />TIMES.TIME_ID between '@{p_date_from}{1.4.1999}' and '@{p_date_to}{1.5.1999}'<br /><br />Default values are only for test in Answers.<br /><br />We add narrative view as replacement for a title view because we want to include last two column fields from Answers (Title date from in dd.mm.yyyy and Title date to in dd.mm.yyyy). We call these values in title with @5 and @6.<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixw4z9ww43XmG_SrBW9xoKQioWIb8ndevj7GgppLiKUN7sDJ-QI-zzGjVE65ZbIs__FKY46cxS19hLhNOAiRF96BcAtdxWHH2hdOv7FN1Dy6pzGYfDxFiB3REe0AQhawXN99_3TiCvUVk/s1600-h/picture266.JPG"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5319289553417660418" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 206px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixw4z9ww43XmG_SrBW9xoKQioWIb8ndevj7GgppLiKUN7sDJ-QI-zzGjVE65ZbIs__FKY46cxS19hLhNOAiRF96BcAtdxWHH2hdOv7FN1Dy6pzGYfDxFiB3REe0AQhawXN99_3TiCvUVk/s320/picture266.JPG" border="0" /></span></a><span style="font-family:verdana;"><br /><br />Delete a classic title view first:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEib2Jrbr525nh-Gd36Tm7emdG24bH6oUekIUkzQZqi_lqzgLS-bXD1B6193KWheVeUyzVcFpGmzUo_QtFVZLqU44m-PPvP79kGWkNRw86t_QU0OLZq5eRMAl9R8LJhQjJ2HbD4efBNJ0mk/s1600-h/picture267.JPG"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5319291666695832978" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 19px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEib2Jrbr525nh-Gd36Tm7emdG24bH6oUekIUkzQZqi_lqzgLS-bXD1B6193KWheVeUyzVcFpGmzUo_QtFVZLqU44m-PPvP79kGWkNRw86t_QU0OLZq5eRMAl9R8LJhQjJ2HbD4efBNJ0mk/s320/picture267.JPG" border="0" /></span></a><span style="font-family:verdana;"><br /><br />We make a dashboard page with our dashboard prompts and Answers report, so we can test it now.<br /><br />Initial start:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuL97jPz8S21Pz1ItnxkCabD9CbIX_wiDdiVPqgrQ58a93nQ_J5_CH7KH6bn_8a20BSkvdVxRqaYGKHF6_WeXMAEzAXZ2B3W1X8jGZC78mJ0XX8FPO7sBQ30KHIFx3JxcGNziaANPck5Y/s1600-h/picture268.JPG"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5319301309776201586" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 85px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuL97jPz8S21Pz1ItnxkCabD9CbIX_wiDdiVPqgrQ58a93nQ_J5_CH7KH6bn_8a20BSkvdVxRqaYGKHF6_WeXMAEzAXZ2B3W1X8jGZC78mJ0XX8FPO7sBQ30KHIFx3JxcGNziaANPck5Y/s320/picture268.JPG" border="0" /></span></a><span style="font-family:verdana;"><br /><br />We didn't touch calendar, we just start report with initial repository variable which is in dd.mm.yyyy format so at this first point our presentation variables p_date_from and p_date_to is filled with dd.mm.yyyy 01.01.1999 (<strong><span style="color:#ffff66;">yellow</span></strong>) although prompt fields are showing d.m.yyyy. (<span style="color:#3333ff;"><strong>blue</strong></span>). We can hide last two columns (<span style="color:#ff0000;"><strong>red</strong></span>) because we use them only in title. <span style="color:#33cc00;"><strong>Green</strong></span> part is populated in narrative view which use last two columns (case). Title will always show date in dd.mm.yyyy format.<br /><br />If we now choose value from a calendar:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnGhn-gTA6rbCKeMM7lWCDbAAne6pX-42AYka2AZFwkCuBmaJhCDZUhbg2e_OG2R2eCwoSbGE8yZX_6wJIwkD4MVlbOfiUZfoE69XU0vPI8jZH3oRydyPrK0Nr-vn5Uu9yRy8QCw3D8Oc/s1600-h/picture269.JPG"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5319315044861621810" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 86px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnGhn-gTA6rbCKeMM7lWCDbAAne6pX-42AYka2AZFwkCuBmaJhCDZUhbg2e_OG2R2eCwoSbGE8yZX_6wJIwkD4MVlbOfiUZfoE69XU0vPI8jZH3oRydyPrK0Nr-vn5Uu9yRy8QCw3D8Oc/s320/picture269.JPG" border="0" /></span></a><span style="font-family:verdana;"><br /><br />We see that the <strong><span style="color:#ffff66;">yellow</span></strong> part is similar to dashboard prompt fields (we populated it from a calendar). Everything else is like in previous initial start part. Title will always show date in dd.mm.yyyy format.<br /><br />NQQuery.log for this example:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvNqmPZFynWAUEHXNNUiBGAhOM1m9UUBBXYpnJp7mrzSX-Lu85doP19v8PQs9Nlg8BbFtSJtQSnL8x39KxihuQPEf_aPgu8AJu7GviI7m9kjSGzAFPVqJzmAR2njKcYU4TQkSollUkDL4/s1600-h/picture270.JPG"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5319319048089274882" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 131px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvNqmPZFynWAUEHXNNUiBGAhOM1m9UUBBXYpnJp7mrzSX-Lu85doP19v8PQs9Nlg8BbFtSJtQSnL8x39KxihuQPEf_aPgu8AJu7GviI7m9kjSGzAFPVqJzmAR2njKcYU4TQkSollUkDL4/s320/picture270.JPG" border="0" /></span></a><span style="font-family:verdana;"><br /><br /><strong>Example 2 - using drop-down list date prompts in filter and report title</strong><br /><br />In the report that we created in the previous example we need to replace p_date_from with p_date_from2 and p_date_to with p_date_to2 in all columns that use presentation variables and also in filter, to filter our report now with drop-down list date prompts.<br /><br />So no mather if we are doing initial start with repository variable or if we select value from a list everything is the same (<strong><span style="color:#ff0000;">red</span></strong>), the format in the title, presentation variables and drop-down list fields is in dd.mm.yyyy format already, so we don't need our CASE for dd.mm.yyyy format in title.<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgiXlfNkN_dkAFNg0WyR0cd0rMnacNmAH_aevtfSdx6MIHKN16gClFQmW-9Rs5r5lP88KalCsJ0D8-LymaG3Vl1uUa65gCHH6iLUwiGugrG01o_RtL5RpmT7w7k5J0lRmNrU7jEDznnX2A/s1600-h/picture271.JPG"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5319328852448632194" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 90px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgiXlfNkN_dkAFNg0WyR0cd0rMnacNmAH_aevtfSdx6MIHKN16gClFQmW-9Rs5r5lP88KalCsJ0D8-LymaG3Vl1uUa65gCHH6iLUwiGugrG01o_RtL5RpmT7w7k5J0lRmNrU7jEDznnX2A/s320/picture271.JPG" border="0" /></span></a><span style="font-family:verdana;"><br /><br />This is NQQuery.log for this example:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYiMcvl566gsi6-qCgHx6Q-bxde9DEeWqck5-NfsYv2cuymBSTXtDLUHa90BH6evx8nZo14ozocsiUb9FcRBlhhPCi_Rt-BDDZ2egA6xJYG07EZGVgsptDywK2Zu4nZoG0bGkW3UcBK4s/s1600-h/picture272.JPG"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5319329558389470018" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 128px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYiMcvl566gsi6-qCgHx6Q-bxde9DEeWqck5-NfsYv2cuymBSTXtDLUHa90BH6evx8nZo14ozocsiUb9FcRBlhhPCi_Rt-BDDZ2egA6xJYG07EZGVgsptDywK2Zu4nZoG0bGkW3UcBK4s/s320/picture272.JPG" border="0" /></span></a><span style="font-family:verdana;"><br /><br />When retreiving rows in both example 1 and 2 Oracle does implicit conversion char to date so index TIMES_PK is used on TIMES.TIME_ID column.<br /><br />If you run all these statements in database:<br /><br /><span style="color:#ff0000;">select 1 from times where time_id='1.1.1999' --example 1<br />select 1 from times where time_id='01.01.1999' --example 2</span><br />select 1 from times where time_id='1.01.1999'<br />select 1 from times where time_id='01.1.1999'<br /><br />you can see that in all cases Oracle use TIMES_PK index, so implicit conversion char to date is present according to NLS settings in session/database.</span>Goran Ockohttp://www.blogger.com/profile/16571461599213456839noreply@blogger.com12tag:blogger.com,1999:blog-196729317318279460.post-45517286544192311262009-03-10T21:24:00.015+01:002009-10-08T11:44:57.462+02:00External table authentication and row-wise initialization in OBIEE<span style="font-family:verdana;">There is a topic in Oracle Business Intelligence Server Administration Guide about security (chapter 15 - Security in Oracle BI).
<br />
<br />Authentication is process where Oracle BI Server checks username and password after user signs on, to verify that the user have necessary permissions to login and retrieve the data.
<br />
<br />Authentication types in OBIEE: LDAP authentication, external table authentication, database authentication on page, etc.
<br />
<br />I'll explain how to use external table authentication and how to work with row-wise initialization.
<br />
<br />There is a little explanation in table format where to use repository, session and presentation variables and how to call them: </span><a href="http://shivabizint.wordpress.com/2008/10/02/oracle-bi-ee-variables-overview/"><span style="font-family:verdana;">OBIEE variables overview</span></a><span style="font-family:verdana;">.
<br />
<br />In my situation I have defined some users in Oracle BI server repository and other in external table as well. I know that this isn't good example in reality. But we'll see how OBIEE works with different types of authentication together.
<br />
<br /><strong>Part1 - External table authentication</strong>
<br />
<br />Oracle BI Server users and groups:
<br />
<br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkTzVoPySvGbHMBUx0QYBq5TqbcoM1evZq9ljoCP0p_pIDyiZxxm11KPWwlpAM-PcEiC0v4S_S9Lqo8JPkhkYHcaJTfdeSUW0ozPwv_sxJ6EUU4qLx25s4DNorW88I3jvyLaN8QhTYIzw/s1600-h/picture230.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 111px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5311494072965920066" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkTzVoPySvGbHMBUx0QYBq5TqbcoM1evZq9ljoCP0p_pIDyiZxxm11KPWwlpAM-PcEiC0v4S_S9Lqo8JPkhkYHcaJTfdeSUW0ozPwv_sxJ6EUU4qLx25s4DNorW88I3jvyLaN8QhTYIzw/s320/picture230.JPG" /></span></a><span style="font-family:verdana;">
<br />
<br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFRQ3x_WO8O4fBpVDCwMF6lwsm8ccNkYcVLP7SKRAur4XUtLww7rrTioxWEK5j_RTHdBVVgFt3rMgsfLTJjGEb7ViGq2WqQUPdcITk4w8NGV4dNHeS8swCCCpKhG6A54qpZsT-x4Qvu8E/s1600-h/picture231.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 83px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5311494230352659106" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFRQ3x_WO8O4fBpVDCwMF6lwsm8ccNkYcVLP7SKRAur4XUtLww7rrTioxWEK5j_RTHdBVVgFt3rMgsfLTJjGEb7ViGq2WqQUPdcITk4w8NGV4dNHeS8swCCCpKhG6A54qpZsT-x4Qvu8E/s320/picture231.JPG" /></span></a><span style="font-family:verdana;">
<br />
<br />UserC, UserN -> Users (A-M)
<br />UserSC -> Special Group
<br />
<br />External table authentication (external users):
<br />
<br /><span style="color:#ff0000;">*We need to import this table to physical layer</span>.
<br />
<br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQpWDlGebdmqLDZ_MqkpkwyiaMshusgZgHHUeCghtTHfYz4UBmd0FGCnuGqDfZU6aODhp0PbExhLoSR6iV2C4gyrBQKV_1k3MEBmZ_rmMvA_U5rbxH0QauyHTcsuZ0ZS51BR_kKC7sOy8/s1600-h/picture232.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 68px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5311496388480813858" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQpWDlGebdmqLDZ_MqkpkwyiaMshusgZgHHUeCghtTHfYz4UBmd0FGCnuGqDfZU6aODhp0PbExhLoSR6iV2C4gyrBQKV_1k3MEBmZ_rmMvA_U5rbxH0QauyHTcsuZ0ZS51BR_kKC7sOy8/s320/picture232.JPG" /></span></a><span style="font-family:verdana;">
<br />
<br />This is taken from chapter 15 - Security in Oracle BI:
<br />
<br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyXAslQAdguw_etB9pGITkgbea-v3hM-1r4QzKzlNka6jdpcV7tY1e-GRksFPQFGKjzmXj25Yn27mKztpzf2unMseWH1Ezc_ewpRDLGHUzHf2vslpaxF2Tpt8GJSR0BY0Dy65oJKyMGjQ/s1600-h/picture233.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 96px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5311499842258664386" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyXAslQAdguw_etB9pGITkgbea-v3hM-1r4QzKzlNka6jdpcV7tY1e-GRksFPQFGKjzmXj25Yn27mKztpzf2unMseWH1Ezc_ewpRDLGHUzHf2vslpaxF2Tpt8GJSR0BY0Dy65oJKyMGjQ/s320/picture233.JPG" /></span></a><span style="font-family:verdana;">
<br />
<br />So we created users separately from Oracle BI Server (groups are already inside BI Server).
<br />
<br />Initialization block:
<br />
<br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZOaCyt-NOT3DBcHBEoQpr5eCpKlDLkvXbCDChMK6e5hipOi1AV2pZ_LqOhdaLt4pOzbLLkKvEm_uN7lxA7nBmQwnubw65tHvlAk8nf4Bg6xQO6hOpaqZaEZyVj-rz35_j6NVT-IiXtMs/s1600-h/picture234.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 262px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5311502332248106258" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZOaCyt-NOT3DBcHBEoQpr5eCpKlDLkvXbCDChMK6e5hipOi1AV2pZ_LqOhdaLt4pOzbLLkKvEm_uN7lxA7nBmQwnubw65tHvlAk8nf4Bg6xQO6hOpaqZaEZyVj-rz35_j6NVT-IiXtMs/s320/picture234.JPG" /></span></a><span style="font-family:verdana;">
<br />
<br />:USER and :PASSWORD represents a username and password that the user entered in start page fields.
<br />
<br />Now, when a user begins a session we will populate system session variables (USER, GROUP, DISPLAYNAME and LOGLEVEL) with values defined in our external table:
<br />
<br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5k1yeM3Ce624N0AOJwn9OQC0KQzMyCGne0DOxU7IHHjB-p0NflFHLljl4RB30gg3aBKYFgowKwGlB9NbEMqB7Xit70JVMxsssWjdK4SrYKOwCtLOGavIrkXfQfhA_z7Ba4euxUNJeiik/s1600-h/picture235.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 235px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5311505975990980850" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5k1yeM3Ce624N0AOJwn9OQC0KQzMyCGne0DOxU7IHHjB-p0NflFHLljl4RB30gg3aBKYFgowKwGlB9NbEMqB7Xit70JVMxsssWjdK4SrYKOwCtLOGavIrkXfQfhA_z7Ba4euxUNJeiik/s320/picture235.JPG" /></span></a><span style="font-family:verdana;">
<br />
<br />Now, before going to a Answers we'll do one more thing. Put some filters to users and groups for restricting data for particular set of tables to test users/groups permissions. I use SALES fact table.
<br />
<br />UserC see all the data, but group Users (A-M) see only SALES data for Tele Sales channel. Users (N-Z) see only Catalog channel data in SALES. Privileges granted explicitly to a user have precedence over privileges granted through
<br />groups so UserC does not have his group filter.
<br />
<br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeC0sjO53XAxNZ73awYB04vqa4VtfwyOH1WsUt1qdq5lpO_mAOGNuHraqUJZwHe0L05xxHNwVWRnC5bKSy6aFhhEG54XIW7zgZDP7BIFSW8hBr2O7Qj0_fwVD3sM9gehnYcvGWP-ZjcY8/s1600-h/picture236.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 123px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5311511098146716050" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeC0sjO53XAxNZ73awYB04vqa4VtfwyOH1WsUt1qdq5lpO_mAOGNuHraqUJZwHe0L05xxHNwVWRnC5bKSy6aFhhEG54XIW7zgZDP7BIFSW8hBr2O7Qj0_fwVD3sM9gehnYcvGWP-ZjcY8/s320/picture236.JPG" /></span></a><span style="font-family:verdana;">
<br />
<br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOdxvQXZGkPG3mz5V2BNAahYJDTUjqUxLaTdkpwpm2uSCuQQe3WTR7dzzKlOpK5rj-vVcxtHsWXMIulFk5B-2fCIFCllKGAdxbK3eVpGx7xSAwWGQNu7lXymnm_uSAWckKwMg3QqIVeDE/s1600-h/picture237.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 122px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5311511207071994818" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOdxvQXZGkPG3mz5V2BNAahYJDTUjqUxLaTdkpwpm2uSCuQQe3WTR7dzzKlOpK5rj-vVcxtHsWXMIulFk5B-2fCIFCllKGAdxbK3eVpGx7xSAwWGQNu7lXymnm_uSAWckKwMg3QqIVeDE/s320/picture237.JPG" /></span></a><span style="font-family:verdana;">
<br />
<br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8eaA1LqJIFfY_SXOC7cXas52y97XLWAtQNhxxxjpjXiZxvymUsh0sawboI4D3k665lDFLgvPjkvkZobWqZs5iSPIsC9YVed9KP1WzBBKfw9YAro90YCYj3HNV0u2K9Uv4QqC_SIp2NIs/s1600-h/picture238.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 146px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5311511297064550786" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8eaA1LqJIFfY_SXOC7cXas52y97XLWAtQNhxxxjpjXiZxvymUsh0sawboI4D3k665lDFLgvPjkvkZobWqZs5iSPIsC9YVed9KP1WzBBKfw9YAro90YCYj3HNV0u2K9Uv4QqC_SIp2NIs/s320/picture238.JPG" /></span></a><span style="font-family:verdana;">
<br />
<br />Now, lets test external table users.
<br />
<br />First log on with UserA and create report:
<br />
<br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9MQ6J-mhUm6X8PeiVPxBLOY5vul8qOsIVQZgm3nMsQhoQALIY_qggVkdY7fq1QMhHzJH4rX623pyF0snMHOGfTI8I77DCzyi_fC4WcWu4ntKsd6TZZbjyfX_VYiLbPq4YE40oXIuSfOo/s1600-h/picture239.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 229px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5311520033166207026" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9MQ6J-mhUm6X8PeiVPxBLOY5vul8qOsIVQZgm3nMsQhoQALIY_qggVkdY7fq1QMhHzJH4rX623pyF0snMHOGfTI8I77DCzyi_fC4WcWu4ntKsd6TZZbjyfX_VYiLbPq4YE40oXIuSfOo/s320/picture239.JPG" /></span></a><span style="font-family:verdana;">
<br />
<br />Results:
<br />
<br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTdO-pAfk4ZzjOviIXXuWGhMhLNhXjlS-4FyAOp9GmhmuV4R7AToOCQJ8qZIdmUzov_MXfOWEaXz0vBQ7o2jIpztfc4txP_j_kCtH-vNV_d0Mr5RWExgT-o4DSozKDseeYV-MnbwrCTf0/s1600-h/picture240.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 70px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5311524553898336402" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTdO-pAfk4ZzjOviIXXuWGhMhLNhXjlS-4FyAOp9GmhmuV4R7AToOCQJ8qZIdmUzov_MXfOWEaXz0vBQ7o2jIpztfc4txP_j_kCtH-vNV_d0Mr5RWExgT-o4DSozKDseeYV-MnbwrCTf0/s320/picture240.JPG" /></span></a><span style="font-family:verdana;">
<br />
<br />UserA is added to a group and he see only Tele Sales channel data (permissions inherited from Users (N-Z) group). Same restriction is for UserB.
<br />
<br />Logon as UserZ now.
<br />
<br />Results:
<br />
<br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjHg52u9PACJOz52jkfVnBcqHuoPlGNI0sycx6qKBiKoD3te2vuhtZJqU9aAH8Np-DWEyy8NepBpsd4AsCGhi6NWDtYKZfKwIowAG_X56_0rRw_vIrp9h6d0W80BqlXcw1yrhyphenhyphenCskyV4qk/s1600-h/picture241.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 44px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5311525449827850338" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjHg52u9PACJOz52jkfVnBcqHuoPlGNI0sycx6qKBiKoD3te2vuhtZJqU9aAH8Np-DWEyy8NepBpsd4AsCGhi6NWDtYKZfKwIowAG_X56_0rRw_vIrp9h6d0W80BqlXcw1yrhyphenhyphenCskyV4qk/s320/picture241.JPG" /></span></a><span style="font-family:verdana;">
<br />
<br />Only Catalog channel data in SALES (permissions inherited from Users (N-Z) group).
<br />
<br />Sign up as UserN:
<br />
<br />UserN does not exist in external table and is populated from Oracle BI Server security. So we can retrieve USER, GROUP, DISPLAYNAME (if we set it) variable but not LOGLEVEL:
<br />
<br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxDwDHsgnaCz1FGg6uG788QP19DSv5XTza34eNP6XP7mARZYscwUWHc6fpZ66NbtGTYmkcvZf_CaAvcQuakE9mmkggqrdgnf9MWcrpXeQkPXMZ7btCNd-YS14rGFMzZPkjWdWMEFBikos/s1600-h/picture242.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 97px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5311530028190073314" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxDwDHsgnaCz1FGg6uG788QP19DSv5XTza34eNP6XP7mARZYscwUWHc6fpZ66NbtGTYmkcvZf_CaAvcQuakE9mmkggqrdgnf9MWcrpXeQkPXMZ7btCNd-YS14rGFMzZPkjWdWMEFBikos/s320/picture242.JPG" /></span></a><span style="font-family:verdana;">
<br />
<br />For some reasons we cannot see LOGLEVEL although we set it on user properties in Adnimistrator:
<br />
<br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikx20zA7ryHSDCkxN4PnSM3nkaYWBXxyWDaz7brwCQ2h16ZgkRvpIwDImbUTkNuyXV1K_kgbuUK4CcdL8H4SdXmdTGh7Wmj20U6LVbyqCLJVVqifWpsGoaHxM_PIDJWZ4ExiD-gHO-Sgg/s1600-h/picture243.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 201px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5311530774930617858" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikx20zA7ryHSDCkxN4PnSM3nkaYWBXxyWDaz7brwCQ2h16ZgkRvpIwDImbUTkNuyXV1K_kgbuUK4CcdL8H4SdXmdTGh7Wmj20U6LVbyqCLJVVqifWpsGoaHxM_PIDJWZ4ExiD-gHO-Sgg/s320/picture243.JPG" /></span></a><span style="font-family:verdana;">
<br />
<br />Remove VALUEOF(NQ_SESSION.LOGLEVEL) from column expression in Answers.
<br />
<br />Results:
<br />
<br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglk_tcpE5TeuB0t43M9IPEgqK6Wfv7wSa8Xc6kgAoueaQFB8jW__xNP2JGPoIjfkulrC5z3Nw5Tx0O-YzGIhRly3T1QnTo24IzSPWdPYMJuydqzN-T7syGMhZelgAFNFQW6ZJmje1N3y0/s1600-h/picture244.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 86px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5311531553376417954" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglk_tcpE5TeuB0t43M9IPEgqK6Wfv7wSa8Xc6kgAoueaQFB8jW__xNP2JGPoIjfkulrC5z3Nw5Tx0O-YzGIhRly3T1QnTo24IzSPWdPYMJuydqzN-T7syGMhZelgAFNFQW6ZJmje1N3y0/s320/picture244.JPG" /></span></a><span style="font-family:verdana;">
<br />
<br />DISPLAYNAME is not set.
<br />Only Catalog channel data selected from SALES.
<br />
<br />Logon as UserC and remove LOGLEVEL from expression.
<br />
<br />Results:
<br />
<br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXKJicOnLI4yBug9nxsJeZty-NWY4oZZIFsZqQVpIdMmD9pDXNDS_uvROlpyj1dNnIE-g-RGoMf5-wACNPOMaw3N6dd8rmP9Xjijcko71eW9O4QA966vBuEo-SFCj9S3J4p6pSIUS9bdM/s1600-h/picture245.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 124px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5311534338939496530" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXKJicOnLI4yBug9nxsJeZty-NWY4oZZIFsZqQVpIdMmD9pDXNDS_uvROlpyj1dNnIE-g-RGoMf5-wACNPOMaw3N6dd8rmP9Xjijcko71eW9O4QA966vBuEo-SFCj9S3J4p6pSIUS9bdM/s320/picture245.JPG" /></span></a><span style="font-family:verdana;">
<br />
<br />There is no inherited permissions for UserC from his group Users (A-M, privileges granted to a user explicitly have precedence in relation to privileges granted to a group).
<br />
<br />NQQuery.log:
<br />
<br /></span></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOKRgLdUQpaZZxULQsr7qIPZ2eZzQDcd_L49Ulkd011vc6o83iNCoQAeI8otT0JLqs8xn5zDSk4uQzLKl4J9lXY3EQXXUfMpDAuMbEEs5ly_Et-io3PQyw0cG9soJ9rBlZNs3MSb9Ggwg/s1600-h/picture246.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 115px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5311535553514138050" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOKRgLdUQpaZZxULQsr7qIPZ2eZzQDcd_L49Ulkd011vc6o83iNCoQAeI8otT0JLqs8xn5zDSk4uQzLKl4J9lXY3EQXXUfMpDAuMbEEs5ly_Et-io3PQyw0cG9soJ9rBlZNs3MSb9Ggwg/s320/picture246.JPG" /></span></a><span style="font-family:verdana;">
<br />
<br /><strong>Part2 - External table authentication and row-wise initialization</strong>
<br />
<br />In part 2 we use only users that we defined from external table. External table we use only for user authentication and if user pass check then we use another database table for retrieving session variables in row-wise initialization.
<br />
<br />What is row-wise initialization?
<br />
<br />The row-wise initialization allows us to create and set session variables dynamically. It is similar to external table authentication except here we have fixed number of columns (name, value) and each row for a particular user represents different name (variable name) and associated value (column value).
<br />
<br />My example use this database table:
<br />
<br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglptRps5820tZ3Vh9ZtXU3TIZ3TIyfmTWKXT-WnexGam_X0YBeZfNuTmradfkpleIo0XwhQ-8au5jUN0g4jBGAQ47J9CYoeEZ6XAMvM19lwADTgxa31ZpHtN5QHcRVhSU_yXpQXGeAwc4/s1600-h/picture247.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 142px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5311635385415448002" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglptRps5820tZ3Vh9ZtXU3TIZ3TIyfmTWKXT-WnexGam_X0YBeZfNuTmradfkpleIo0XwhQ-8au5jUN0g4jBGAQ47J9CYoeEZ6XAMvM19lwADTgxa31ZpHtN5QHcRVhSU_yXpQXGeAwc4/s320/picture247.JPG" /></span></a><span style="font-family:verdana;">
<br />
<br />I know that this is not in practice, but I used hybrid solution for demonstration. First I check my user after log in, and for that I use the same table as in part 1 for authentication. This is first initialization block and I'll populate only USER system variable:
<br />
<br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjicEQwh8JmNusUml0XAXjsIG42iXdKbDz3Cfho3D-K2gGtnKbJ57USmWW7uMtpJNSSMED4FYsq78sjmjD1WJCo4Slpx6LFjAa1JibcAwpEocqgw2EweTQ_65h9-NuDyxAWTxVe7IV7Ptw/s1600-h/picture248.JPG"><span style="font-family:verdana;"><img style="WIDTH: 245px; HEIGHT: 320px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5311637713651880098" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjicEQwh8JmNusUml0XAXjsIG42iXdKbDz3Cfho3D-K2gGtnKbJ57USmWW7uMtpJNSSMED4FYsq78sjmjD1WJCo4Slpx6LFjAa1JibcAwpEocqgw2EweTQ_65h9-NuDyxAWTxVe7IV7Ptw/s320/picture248.JPG" /></span></a><span style="font-family:verdana;">
<br />
<br />And after that we use another block with row-wise initialization. For current user we pick up column SESSION_VARIABLE_NAME from OBIEE_ROW_WISE_INIT. This column represents variable name, system or non-system. So this row-wise will dynamically create session variable and set it with value in SESSION_VARIABLE_VALUE column:
<br />
<br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_BER3qX_MKrPCWDUwHBUrNjViv65Yx1pwLTOQDfu1nZSMMcoW0QV4OCmRKFrdR6NMejlPJwi-kBgiRFRHX3TmqTwCBj9l3-41y065_lE3UK2bNg46fPVkkrcM2U9lMjMZ1psBD4z9BfU/s1600-h/picture249.JPG"><span style="font-family:verdana;"><img style="WIDTH: 318px; HEIGHT: 320px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5311644017342175698" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_BER3qX_MKrPCWDUwHBUrNjViv65Yx1pwLTOQDfu1nZSMMcoW0QV4OCmRKFrdR6NMejlPJwi-kBgiRFRHX3TmqTwCBj9l3-41y065_lE3UK2bNg46fPVkkrcM2U9lMjMZ1psBD4z9BfU/s320/picture249.JPG" /></span></a><span style="font-family:verdana;">
<br />
<br />For UserA there are four variables to set dynamically. One of them is non-system, MARRIED.
<br />
<br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXH-ZaDEqH0mI_SiW5TAzPbbMVzi4Cr4UkWMZWGfg6NYZNsgxme83Fxvc9PPbWrJwM2KToFky-VXsnMx9zz9Qt-jz_DqKz1t0iZuytV2wU400vzgUL6qUu8fuhSQRQw1rHSkvdkC45moM/s1600-h/picture250.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 53px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5311641930314111186" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXH-ZaDEqH0mI_SiW5TAzPbbMVzi4Cr4UkWMZWGfg6NYZNsgxme83Fxvc9PPbWrJwM2KToFky-VXsnMx9zz9Qt-jz_DqKz1t0iZuytV2wU400vzgUL6qUu8fuhSQRQw1rHSkvdkC45moM/s320/picture250.JPG" /></span></a><span style="font-family:verdana;">
<br />
<br />This block depends on the results of the previous block. This can be set in execution precedence part of block:
<br />
<br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOQJCoAFpi3685BAmHuhsODN6CSO3MjXPyJNbndTikTklEni884nPRjVns7LvOhKJtRK-AkqgXI454Vk7GV89VakYSKhkjwpcrTWl44FTs1mvEa3C1CPTcIn0jBTcmPV_QUa5XrdJpJYs/s1600-h/picture251.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 87px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5311643204322905554" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOQJCoAFpi3685BAmHuhsODN6CSO3MjXPyJNbndTikTklEni884nPRjVns7LvOhKJtRK-AkqgXI454Vk7GV89VakYSKhkjwpcrTWl44FTs1mvEa3C1CPTcIn0jBTcmPV_QUa5XrdJpJYs/s320/picture251.JPG" /></span></a><span style="font-family:verdana;">
<br />
<br />We could also use VALUEOF(NQ_SESSION.USER) instead of :USER.
<br />
<br />For now we have USER variable set from the first block and other variables set from row-wise dynamically in second block. All this happens in session level, after login.
<br />
<br />In the next step we add another block with row-wise but we set dynamically session variable that we hardcoded in select statement in block:
<br />
<br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkgytEEckRiWjlXy4jls2oSxEgCELK4lXR-qqZeA8jcwg9QpYEl863eMUd-i8W9ntdKZAWkVDDi3BE9cxi8RkmfkCORfxdP-3ORmpiYBwIyCobWFrM3OlicQooi4nV8wL0dyJnwgQ3oCI/s1600-h/picture252.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 277px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5311646930481645362" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkgytEEckRiWjlXy4jls2oSxEgCELK4lXR-qqZeA8jcwg9QpYEl863eMUd-i8W9ntdKZAWkVDDi3BE9cxi8RkmfkCORfxdP-3ORmpiYBwIyCobWFrM3OlicQooi4nV8wL0dyJnwgQ3oCI/s320/picture252.JPG" /></span></a><span style="font-family:verdana;">
<br />
<br />Select:
<br />
<br />select 'USERS_IN_GROUP', username
<br />from hr.obiee_row_wise_init
<br />where session_variable_name='GROUP'
<br />and session_variable_value ='VALUEOF(NQ_SESSION.GROUP)'
<br />
<br />USERS_IN_GROUP represents a list of values (we can use this as filter in Answers) of all users that have same group as the user that we use for login.
<br />
<br />Note that there is also execution precedence.
<br />
<br />Test, login as UserA.
<br />
<br />USERS_IN_GROUP returns UserA and UserB in the list for Users (A-M) group, according to our OBIEE_ROW_WISE_INIT table.
<br />
<br />Create a report in Answers with two expressions:
<br />
<br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiitVMpfp0Gi3xi0K3pt986Z-ZN-imneNpw4Bx3pkJyFHdmy8De2hGU4oOhY3LHNk4BfM5KxNqsLsykGrHnMvRtD8_PSU3P_tdgLMrMDLBgde4KHUg-F5nIXdMB7XKfof3Ow8p4OlKqVCU/s1600-h/picture253.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 104px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5311654736878446498" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiitVMpfp0Gi3xi0K3pt986Z-ZN-imneNpw4Bx3pkJyFHdmy8De2hGU4oOhY3LHNk4BfM5KxNqsLsykGrHnMvRtD8_PSU3P_tdgLMrMDLBgde4KHUg-F5nIXdMB7XKfof3Ow8p4OlKqVCU/s320/picture253.JPG" /></span></a><span style="font-family:verdana;">
<br />
<br />Expression 1:
<br />
<br />case
<br />when CHANNELS.CHANNEL_DESC='Catalog' then 'UserA'
<br />when CHANNELS.CHANNEL_DESC='Direct Sales' then 'UserB'
<br />else 'UserN'
<br />end
<br />
<br />Results without filter:
<br />
<br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlKNI3fAHHhRlmwEWDU1mowcLs5tO4vUPEf3151ygM_sEJW8bYIWYKsIGuEwzWV-8YTQZGzz1O0T5CkZCSgztPRQstAjcIWuB_lqIcI_bxYawLRCbCT9IGN50DtzZjFnD1hy0iVV0bbFs/s1600-h/picture254.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 152px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5311655152638342786" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlKNI3fAHHhRlmwEWDU1mowcLs5tO4vUPEf3151ygM_sEJW8bYIWYKsIGuEwzWV-8YTQZGzz1O0T5CkZCSgztPRQstAjcIWuB_lqIcI_bxYawLRCbCT9IGN50DtzZjFnD1hy0iVV0bbFs/s320/picture254.JPG" /></span></a><span style="font-family:verdana;">
<br />
<br />If we add row-wise session variable USERS_IN_GROUP as list of values in the filter to expression 1 column:
<br />
<br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimm_hdfT3oc1VMvc0C9ll4wYHhjZIA_4Z9BDe4U-W9my-RrdhrIxN8RnSN1I0qodP-BpiUfm0CKB9On7EvwWREXx5yAgWPYG17TbjtlLxidrC6C3cvzlWMl3N99aCdl9tSmlNfmXiL6IQ/s1600-h/picture255.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 17px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5311655902501359154" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimm_hdfT3oc1VMvc0C9ll4wYHhjZIA_4Z9BDe4U-W9my-RrdhrIxN8RnSN1I0qodP-BpiUfm0CKB9On7EvwWREXx5yAgWPYG17TbjtlLxidrC6C3cvzlWMl3N99aCdl9tSmlNfmXiL6IQ/s320/picture255.JPG" /></span></a><span style="font-family:verdana;">
<br />
<br />Filtered results:
<br />
<br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9hn4N9woxEg7y1WYOgBz29dLBBC9Ih2b-Rpf8ZfxHQsnIgfeL4FEjKB_7iuTPhknpkUsnxhGEyrHaePZIqlZUWLEQIb-sI420zrjiVsNCJMb_PQSZ_2UpSV5Yl6Lfbgm7KVbS9B5iEAA/s1600-h/picture256.JPG"><span style="font-family:verdana;"><img style="WIDTH: 320px; HEIGHT: 74px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5311656827728395650" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9hn4N9woxEg7y1WYOgBz29dLBBC9Ih2b-Rpf8ZfxHQsnIgfeL4FEjKB_7iuTPhknpkUsnxhGEyrHaePZIqlZUWLEQIb-sI420zrjiVsNCJMb_PQSZ_2UpSV5Yl6Lfbgm7KVbS9B5iEAA/s320/picture256.JPG" /></span></a><span style="font-family:verdana;">
<br />
<br />This works correctly.</span>
<br />Goran Ockohttp://www.blogger.com/profile/16571461599213456839noreply@blogger.com4tag:blogger.com,1999:blog-196729317318279460.post-48069821527773264442009-03-03T20:00:00.007+01:002009-03-05T12:02:23.780+01:00How to change date format mask in date dashboard prompts - drop-down list and calendar<span style="font-family:verdana;">If you have ever asked yourself how to change the format mask of date dashboard prompt that used calendar control, here is the solution of this problem.<br /><br />We know that we can use drop-down list and calendar control for the date dashboard prompt, and there is a file localedefinitions.xml in D:\OracleBI\web\config for editing locale settings. Just for my test, I'm using english-base (en) part of this file.<br /><br />Editing dateShortFormat entry as in picture:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIiH9KYdSCu4tV4mrOVY2aJowCEibufsnx2jhA0vuHmtYq12Q0MHSTzO3fZ9qGMHCdkZxVu_La_aPNHd8ydjc4eWk7jeywJqzVaTxI6xoQmK08NJfka7fMpjYVjInbmNulYMXS5UJJw8w/s1600-h/picture210.JPG"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5308630293014695138" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 155px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIiH9KYdSCu4tV4mrOVY2aJowCEibufsnx2jhA0vuHmtYq12Q0MHSTzO3fZ9qGMHCdkZxVu_La_aPNHd8ydjc4eWk7jeywJqzVaTxI6xoQmK08NJfka7fMpjYVjInbmNulYMXS5UJJw8w/s320/picture210.JPG" border="0" /></span></a><span style="font-family:verdana;"><br /><br />will give us desired date format for drop-down list:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLljY7EFEUlHmM2NjV-CS7IELM5rGBAuXBSeVAlM2olnFmudHSHZ5clJeYYsySm-AUrx3cwpEf-G_93i-rGc66QRbD8P-hjLZCDGxdgVVxz8LIhEYj5gQHJVS1PKGexyd5xIvNgNUSpgw/s1600-h/picture211.JPG"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5308631232934984050" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 190px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLljY7EFEUlHmM2NjV-CS7IELM5rGBAuXBSeVAlM2olnFmudHSHZ5clJeYYsySm-AUrx3cwpEf-G_93i-rGc66QRbD8P-hjLZCDGxdgVVxz8LIhEYj5gQHJVS1PKGexyd5xIvNgNUSpgw/s320/picture211.JPG" border="0" /></span></a><span style="font-family:verdana;"><br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3CnY7W3e1pJjYmxL6h36_NsAAbB8-BE0jmT-iVJ3nb5ORYamQjDMg6bZmWmwIWL5DR5ex6DX_vDnXpWvxem_r0t-0uKRYKgJE_Q6d1PBAk4SdCBJ8v6o2FxN-tk1N9P3NqXUDmgxAJdA/s1600-h/picture212.JPG"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5308631307035731794" style="WIDTH: 188px; CURSOR: hand; HEIGHT: 148px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3CnY7W3e1pJjYmxL6h36_NsAAbB8-BE0jmT-iVJ3nb5ORYamQjDMg6bZmWmwIWL5DR5ex6DX_vDnXpWvxem_r0t-0uKRYKgJE_Q6d1PBAk4SdCBJ8v6o2FxN-tk1N9P3NqXUDmgxAJdA/s320/picture212.JPG" border="0" /></span></a><span style="font-family:verdana;"><br /><br />But if we use a calendar:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJvM71tlAZsUxt0p1Q7GfJufllZo1xBJG1uJ88BZf0zBdIcPBsJNNtolLeLsXTlKlkqN3t6YQ5DjiCh0djQVtyfLzpXTSEP9X-EcOvjOWQO12xWjdyhkVz-FzXt9msMIm4tAtyyvVLWD8/s1600-h/picture213.JPG"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5308634726176726674" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 158px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJvM71tlAZsUxt0p1Q7GfJufllZo1xBJG1uJ88BZf0zBdIcPBsJNNtolLeLsXTlKlkqN3t6YQ5DjiCh0djQVtyfLzpXTSEP9X-EcOvjOWQO12xWjdyhkVz-FzXt9msMIm4tAtyyvVLWD8/s320/picture213.JPG" border="0" /></span></a><span style="font-family:verdana;"><br /><br />we see that dateShortFormat entry doesn't have any influence on it:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9s1hkSfaFJqHwYaRaclEOrVmz2w5DkAZ4v5_qbYVbAYeMY5XHrrJYmkLMCW-HvKbIB2MVpnDGlytcMVFjiP-F2WS1dsrRi_Gkh42okKam3uUye1pgIIZCQ5AeVsqdR5WWvJGk0X4L4P8/s1600-h/picture214.JPG"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5308634832996565426" style="WIDTH: 245px; CURSOR: hand; HEIGHT: 245px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9s1hkSfaFJqHwYaRaclEOrVmz2w5DkAZ4v5_qbYVbAYeMY5XHrrJYmkLMCW-HvKbIB2MVpnDGlytcMVFjiP-F2WS1dsrRi_Gkh42okKam3uUye1pgIIZCQ5AeVsqdR5WWvJGk0X4L4P8/s320/picture214.JPG" border="0" /></span></a><span style="font-family:verdana;"><br /><br />Let's change now dateSeparator and dateOrder entries in localedefiniitions.xml to see what will happen. I want to see date in my user friendly format dd.mm.yyyy, with or without leading zeros (01.01.2008 or 1.1.2008), so I changed dateOrder to dmy and dateSeparator to zero (.).<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixiDyO3qfc5r__cWE5b8vLV3O3rnnPC82yVbvivYWvD2L6qOI7WBKoD5VtQNM0mgaX2_Y3LCYbm5s8dhuMQmIp3eIBgE3rkqrN8QK8hIuq95LBnF6kwteuloEYnkjUd15c7vFPzdqqmwg/s1600-h/picture215.JPG"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5308642402947786738" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 46px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixiDyO3qfc5r__cWE5b8vLV3O3rnnPC82yVbvivYWvD2L6qOI7WBKoD5VtQNM0mgaX2_Y3LCYbm5s8dhuMQmIp3eIBgE3rkqrN8QK8hIuq95LBnF6kwteuloEYnkjUd15c7vFPzdqqmwg/s320/picture215.JPG" border="0" /></span></a><span style="font-family:verdana;"><br /><br />Remember, dateShortFormat is still in dd-MM-yyyy form. We will see later how it affects on calendar.<br /><br />After restarting presentation service, a new format mask is applied on calendar:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgc6Sb1bPvAgTjwHJhvPq0G8AkPko-T18OZJAxanw5lFG9aS61_pnuFtt48f2bHhCYozNENV5diqyDmjPIr3G9PwyeGYefdI493TXcR_Jnwc9IHn_OSptP8-jomuqF07JsSETpobLvTk5Q/s1600-h/picture216.JPG"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5308644728995223330" style="WIDTH: 237px; CURSOR: hand; HEIGHT: 242px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgc6Sb1bPvAgTjwHJhvPq0G8AkPko-T18OZJAxanw5lFG9aS61_pnuFtt48f2bHhCYozNENV5diqyDmjPIr3G9PwyeGYefdI493TXcR_Jnwc9IHn_OSptP8-jomuqF07JsSETpobLvTk5Q/s320/picture216.JPG" border="0" /></span></a><span style="font-family:verdana;"><br /><br />Ok, so far so good.<br /><br />But what if we want to apply some default date value to calendar prompt? What is the format in which default value should be?<br /><br />Let's go into BI Administrator and create initialization block and repository variable for test.<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKvNmymHTKOA1O6UwcyIqPnRzD60DPyl2mqVMpLoeUFOna2vtmQiXbW2lWmJ5ZFD13RJMkUcBgDeEd3EzC8ff-TtgU7IDRBVaaR13zWX81WG-wG4XfzCO-rgsWSIZmnrZZ6FKeuNghHTs/s1600-h/picture217.JPG"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5308646717861156226" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 265px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKvNmymHTKOA1O6UwcyIqPnRzD60DPyl2mqVMpLoeUFOna2vtmQiXbW2lWmJ5ZFD13RJMkUcBgDeEd3EzC8ff-TtgU7IDRBVaaR13zWX81WG-wG4XfzCO-rgsWSIZmnrZZ6FKeuNghHTs/s320/picture217.JPG" border="0" /></span></a><span style="font-family:verdana;"><br /><br />Variable rv_test_date_to_char is in character format ('dd.mm.yyyy').<br /><br />We set rv_test_date_to_char as default value to a calendar prompt:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjytOIoaqyYxFwT5qAEBkX_CLoqYHEYFNALXO44nPvTYfzS3hsXPRKnxBHTcYBRSn37fjHcBtYlGTUc06TKFDbKOYdS4prMct6ixzGYoWQGJ4xRQChg-1idLgcW7KhYFVvIZpiFI6tiJkg/s1600-h/picture218.JPG"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5308648050117775170" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 43px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjytOIoaqyYxFwT5qAEBkX_CLoqYHEYFNALXO44nPvTYfzS3hsXPRKnxBHTcYBRSn37fjHcBtYlGTUc06TKFDbKOYdS4prMct6ixzGYoWQGJ4xRQChg-1idLgcW7KhYFVvIZpiFI6tiJkg/s320/picture218.JPG" border="0" /></span></a><span style="font-family:verdana;"><br /><br />After preview, we can see that the default variable rv_test_date_to_char (character) is converted to a date format before getting into calendar prompt field using dateShortFormat dd-MM-yyyy entry in localedefinitions.xml:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3yvbZXEeD0_0W3o4Agnzgnz8K2eZ3xRZFk8npC2pYToMCnQflDyeH0vvX2OixhPJVYY-4Mra_7uyN2mU-RwIWmgjsPnlpzn2DHDKVQL4N1Z65eD20RSOE83nPdJHwXPvwSVJXewL9Hp0/s1600-h/picture219.JPG"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5308650045465839170" style="WIDTH: 157px; CURSOR: hand; HEIGHT: 61px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3yvbZXEeD0_0W3o4Agnzgnz8K2eZ3xRZFk8npC2pYToMCnQflDyeH0vvX2OixhPJVYY-4Mra_7uyN2mU-RwIWmgjsPnlpzn2DHDKVQL4N1Z65eD20RSOE83nPdJHwXPvwSVJXewL9Hp0/s320/picture219.JPG" border="0" /></span></a><span style="font-family:verdana;"><br /><br />We don't like this, because if you choose value from a calendar, you'll see a difference between these two formats, the default one and the one from a calendar:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5mLSeIlZM6Y6OKb36cgGl45sapOTFVqBil0K1-CjOBaMfOPpSYwrdLTttgw_9CFeUmqZjUUQqTixX_Bi5exd1qQvARH4yshgWpds_G5HPC7WWCfgrDi_CtPH2VPhbe3_jrAgx6a3RnQc/s1600-h/picture220.JPG"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5308651408750335202" style="WIDTH: 237px; CURSOR: hand; HEIGHT: 239px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5mLSeIlZM6Y6OKb36cgGl45sapOTFVqBil0K1-CjOBaMfOPpSYwrdLTttgw_9CFeUmqZjUUQqTixX_Bi5exd1qQvARH4yshgWpds_G5HPC7WWCfgrDi_CtPH2VPhbe3_jrAgx6a3RnQc/s320/picture220.JPG" border="0" /></span></a><span style="font-family:verdana;"><br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQek_Ru7Oxrafx7v4B3V-UK2bQHPlguxiYzzlMBymrfuSJ3Q9a4T1qIYXVBmv1dkCQkJ68hGpfXQ0cTtLnOaJqECIh6616_NDvm3xV5DJRg-m1RNeFMvUKF9E0K_FW60ny4dsNcW0Yzdw/s1600-h/picture221.JPG"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5308651567305483634" style="WIDTH: 156px; CURSOR: hand; HEIGHT: 57px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQek_Ru7Oxrafx7v4B3V-UK2bQHPlguxiYzzlMBymrfuSJ3Q9a4T1qIYXVBmv1dkCQkJ68hGpfXQ0cTtLnOaJqECIh6616_NDvm3xV5DJRg-m1RNeFMvUKF9E0K_FW60ny4dsNcW0Yzdw/s320/picture221.JPG" border="0" /></span></a><span style="font-family:verdana;"><br /><br />Solution is to synchronize all formats.<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbOJvUxe-g93kWSEgjr12QxfR-9Y1VNsnZrVADV-LHal8HUY2BLrNMeNulHi9o0lsF7ounTijo5v7j7pL_yV6wzS8kREIGZMHhVkzf_nfSnqYNmR2reMJbxjOpIpikcFk2QJ0Ym-jrM40/s1600-h/picture222.JPG"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5308655155076132786" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 125px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbOJvUxe-g93kWSEgjr12QxfR-9Y1VNsnZrVADV-LHal8HUY2BLrNMeNulHi9o0lsF7ounTijo5v7j7pL_yV6wzS8kREIGZMHhVkzf_nfSnqYNmR2reMJbxjOpIpikcFk2QJ0Ym-jrM40/s320/picture222.JPG" border="0" /></span></a><span style="font-family:verdana;"><br /><br />dateShortFormat -> d.M.yyyy<br />dateSeparator -> .<br />dateOrder -> dmy<br /><br />Don't forget to enter date format d.M.yyyy in dateFormats entry if it doesn't exist there:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqeanIyoGcL4Qmu7JO5lIWGRHY6LMucmaPsThqfzyvwzuUC1DPugnPR3sN3ag9Z7dpBrXO_HRUKZvmEZxypdirK-2gBfN-syJMZL1Xkg4mc3hJXfG92Nz03IzB3Cg7Av2k16WQ5oYjLMk/s1600-h/picture223.JPG"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5308656480394649474" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 213px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqeanIyoGcL4Qmu7JO5lIWGRHY6LMucmaPsThqfzyvwzuUC1DPugnPR3sN3ag9Z7dpBrXO_HRUKZvmEZxypdirK-2gBfN-syJMZL1Xkg4mc3hJXfG92Nz03IzB3Cg7Av2k16WQ5oYjLMk/s320/picture223.JPG" border="0" /></span></a><span style="font-family:verdana;"><br /><br />After final test our repository variable is converted from character '01.01.1999' to a date 1.1.1999, before getting into calendar prompt field:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIk77Jy_5GkNBa8znJuMB8joQMKSn60TkQs-11XpdbZZWZqqUWpWLf2O0cbiMtUONEdesnePPlnSil9iYE2vs2WCU7gR_i_ABAuft19s4gj7LTIG3DmzTRCSoSjqAkB0Ld2bNCDsSBxd0/s1600-h/picture224.JPG"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5308659960635392994" style="WIDTH: 155px; CURSOR: hand; HEIGHT: 59px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIk77Jy_5GkNBa8znJuMB8joQMKSn60TkQs-11XpdbZZWZqqUWpWLf2O0cbiMtUONEdesnePPlnSil9iYE2vs2WCU7gR_i_ABAuft19s4gj7LTIG3DmzTRCSoSjqAkB0Ld2bNCDsSBxd0/s320/picture224.JPG" border="0" /></span></a><span style="font-family:verdana;"><br /><br />Now, if you choose same value from a calendar, you'll get the same format as before, and that's correct:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0xrBcqTDrHUmoW42353Jhew9bsZCYvilvSszdoeSCkss9N28AbbqQoadOJqqHQumv5hXVEARy43Ike5N58Ehh4_yYgCWW4DJRGcIvruTh5QzA12On-VkcvzdiAxN8Enusww-w6tETXbU/s1600-h/picture225.JPG"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5308660379813882114" style="WIDTH: 242px; CURSOR: hand; HEIGHT: 243px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0xrBcqTDrHUmoW42353Jhew9bsZCYvilvSszdoeSCkss9N28AbbqQoadOJqqHQumv5hXVEARy43Ike5N58Ehh4_yYgCWW4DJRGcIvruTh5QzA12On-VkcvzdiAxN8Enusww-w6tETXbU/s320/picture225.JPG" border="0" /></span></a><span style="font-family:verdana;"><br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIk77Jy_5GkNBa8znJuMB8joQMKSn60TkQs-11XpdbZZWZqqUWpWLf2O0cbiMtUONEdesnePPlnSil9iYE2vs2WCU7gR_i_ABAuft19s4gj7LTIG3DmzTRCSoSjqAkB0Ld2bNCDsSBxd0/s1600-h/picture224.JPG"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5308659960635392994" style="WIDTH: 155px; CURSOR: hand; HEIGHT: 59px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIk77Jy_5GkNBa8znJuMB8joQMKSn60TkQs-11XpdbZZWZqqUWpWLf2O0cbiMtUONEdesnePPlnSil9iYE2vs2WCU7gR_i_ABAuft19s4gj7LTIG3DmzTRCSoSjqAkB0Ld2bNCDsSBxd0/s320/picture224.JPG" border="0" /></span></a><span style="font-family:verdana;"><br /><br />With this solution you'll have a full control of date format when you are using calendar so u can use default repository variable that is a character and later you can parse value from a date dashboard prompt to a presentation variable and use it wherever you want to (title, filter).<br /><br />With above settings in localedefinitions.xml, if we now include default variable rv_test_date_to_char in drop-down list we will get:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3FxQ0TYD4cj6W6zohC272-LIwy6pGjpdOx9JLIqD38j0YMAwK_FGrm9l6v7I5yua1YCzYL9Nk4x4RwxqI9OsvXMgFyS_Aybj_R2n08bXVtid-IxeNyDdoqkXfRGOuQhJA6DFfhZUI2f4/s1600-h/picture226.JPG"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5308673478924849746" style="WIDTH: 183px; CURSOR: hand; HEIGHT: 153px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3FxQ0TYD4cj6W6zohC272-LIwy6pGjpdOx9JLIqD38j0YMAwK_FGrm9l6v7I5yua1YCzYL9Nk4x4RwxqI9OsvXMgFyS_Aybj_R2n08bXVtid-IxeNyDdoqkXfRGOuQhJA6DFfhZUI2f4/s320/picture226.JPG" border="0" /></span></a><span style="font-family:verdana;"><br /><br />No conversion of character 01.01.1999 to a dateShortFormat d.M.yyyy for drop-down list prompts?<br /><br />So, if we like to see the same format in drop down list with the one we have in variable (character) here is a solution:<br /><br />In edit column formula write to populate character format:<br /><br />case when 1=2 then cast(TIMES.TIME_ID as char) else EVALUATE('TO_CHAR(%1,%2)' as varchar(20),TIMES.TIME_ID,'dd.mm.yyyy') end<br /><br />Open SQL Results and add for test purpose:<br /><br />SELECT case when 1=2 then cast(TIMES.TIME_ID as char) else EVALUATE('TO_CHAR(%1,%2)' as varchar(20),TIMES.TIME_ID,'dd.mm.yyyy') end FROM "Normal model" where TIMES.CALENDAR_MONTH_DESC='1999-01' order by TIMES.TIME_ID<br /><br />After a preview we see that the data in drop-down list is in character format (like variable) and order by is correct. </span><span style="font-family:verdana;"><br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibeUCe3evqMyRaqYt7Vk96qCbEhxq11zDndJynCbownsXFx8npxChf6U9ynrD1pVdag1Iu4XKnWkwNaGLpzukVMPxSteatzJ4NOyPuzF9Cf0kGCA-CKUS609gEl3vmndZdZDOKa6W9pBU/s1600-h/picture227.JPG"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5308676074499342370" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 181px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibeUCe3evqMyRaqYt7Vk96qCbEhxq11zDndJynCbownsXFx8npxChf6U9ynrD1pVdag1Iu4XKnWkwNaGLpzukVMPxSteatzJ4NOyPuzF9Cf0kGCA-CKUS609gEl3vmndZdZDOKa6W9pBU/s320/picture227.JPG" border="0" /></span></a><span style="font-family:verdana;"><br /><br />We should use drop-down list only with constraint option (with selecting months as parent) because it's confusing to see to many month values in list.</span>Goran Ockohttp://www.blogger.com/profile/16571461599213456839noreply@blogger.com12tag:blogger.com,1999:blog-196729317318279460.post-90127039135735483462009-02-25T09:00:00.007+01:002009-02-25T19:28:43.038+01:00Mark Rittman Enterprise Business Intelligence MasterClass seminar in Zagreb<span style="font-family:verdana;">Mark Rittman's two-day Enterprise Business Intelligence MasterClass seminar in Zagreb finished yesterday (23-24.02.2009). It was very dynamic and interesting, with a lot of topics, presentations and demonstrations. There are some future releases that we are expecting... Some topics about which was Mark talking:<br /><br />Oracle BI Enterprise Edition (OBIEE)<br />Oracle BI Enterprise Edition Plus (OBIEE Plus),<br />Oracle Essbase (integration with OBIEE),<br />Oracle Data Integrator (ODI),<br />Oracle Fusion Middleware,<br />Oracle Service-Oriented Architecture (Oracle SOA Suite),<br />Oracle BI Applications.<br /><br />Mark in action:<br /><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSzIm2oTKYZeVs5h-fHnd4C4v3jA6NfuGiEH7-58P28hLhMUdbLZGRW3Ns258OFIAueQGzcTHc3iUXkcUqh3_BBvelYaZw16PAGPqUArxsYaOrbwgeG5vK0ztD01rE3dFaYmcDoEWo0d8/s1600-h/picture203.JPG"><img id="BLOGGER_PHOTO_ID_5306647382620965186" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 202px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSzIm2oTKYZeVs5h-fHnd4C4v3jA6NfuGiEH7-58P28hLhMUdbLZGRW3Ns258OFIAueQGzcTHc3iUXkcUqh3_BBvelYaZw16PAGPqUArxsYaOrbwgeG5vK0ztD01rE3dFaYmcDoEWo0d8/s320/picture203.JPG" border="0" /></a><br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhV2KhcLQi0IQ9WSp4A944SQH_b-wk5BuezO92j1rA-RR9iFNa5F0PNP0-aqh8U0rrfzNBWBpdJyDDefiLjrrVl7x1xYkIP9iX2HbsZyb6IfP7wcc6O4UHdVoQ6KDBr4WrWUdXhPTPiN9U/s1600-h/picture202.JPG"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5306640128637372338" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 247px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhV2KhcLQi0IQ9WSp4A944SQH_b-wk5BuezO92j1rA-RR9iFNa5F0PNP0-aqh8U0rrfzNBWBpdJyDDefiLjrrVl7x1xYkIP9iX2HbsZyb6IfP7wcc6O4UHdVoQ6KDBr4WrWUdXhPTPiN9U/s320/picture202.JPG" border="0" /></span></a><span style="font-family:verdana;">Goran Ockohttp://www.blogger.com/profile/16571461599213456839noreply@blogger.com0tag:blogger.com,1999:blog-196729317318279460.post-30513921792064075272009-01-20T16:30:00.036+01:002009-04-08T11:28:01.633+02:00Fragmentation in OBIEE<span style="font-family:verdana;">We use fragmentation when we have fact or dimensional data in one or more different tables or data is splitted in different data sources. Then each logical table source represents one data segment.<br /><br />For example, clients, in the first table are clients from A to M, in the second from M to Z.<br /><br /><strong>Fragmentation of dimension</strong><br /><br />If our dimensional data is located on two or more physical tables in database (tables) or it is on separeted data sources then we can handle this by using UNION ALL views in physical layer.<br /><br />However for testing this option we'll simulate this by using CHANNELS table. So we splitt it to a table CHANNELS_OTHER and CHANNELS. Fragmentation attrubur is CHANNEL_ID.<br /><br /></span></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgAVd5F_Ls367LptrOHeO7w2yltngljzIEJC0BnUvpLh66WR7y9C-KWX69Lpx-l6eQ12iXFufxOwZg2l2amJ2pPrZI9JCBzJ4ncXoteIBoyt9S-Q5e7nM3oARQVOrAw_SWXGcfnk3uSXG4/s1600-h/picture109.jpg"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5293335755077845266" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 116px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgAVd5F_Ls367LptrOHeO7w2yltngljzIEJC0BnUvpLh66WR7y9C-KWX69Lpx-l6eQ12iXFufxOwZg2l2amJ2pPrZI9JCBzJ4ncXoteIBoyt9S-Q5e7nM3oARQVOrAw_SWXGcfnk3uSXG4/s320/picture109.jpg" border="0" /></span></a><span style="font-family:verdana;"><br /><br />In our SALES fact table that we used here we use CHANNEL_ID from both tables CHANNELS and CHANNELS_OTHER.<br /><br />Physical model, join:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOAfV14AfOUcJ1YZkLLasX4auIOv_rsVZHgyW2lVFnEjIIDiKrEZZG_zoISTrCEIZzUAJcy_H1Gj9cm17oNqIhsi6S2dR0mrsj9ILSihBMzUYhnSVJS_E0qWdr9H8MHegcTfva_3l0TKM/s1600-h/picture110.jpg"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5293337725401899410" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 238px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOAfV14AfOUcJ1YZkLLasX4auIOv_rsVZHgyW2lVFnEjIIDiKrEZZG_zoISTrCEIZzUAJcy_H1Gj9cm17oNqIhsi6S2dR0mrsj9ILSihBMzUYhnSVJS_E0qWdr9H8MHegcTfva_3l0TKM/s320/picture110.jpg" border="0" /></span></a><span style="font-family:verdana;"><br /><br />SALES.CHANNEL_ID >- CHANNELS.CHANNEL_ID<br />SALES.CHANNEL_ID >- CHANNELS_OTHER.CHANNEL_ID<br /><br />BMM:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgm8HgJFtbfPpQffuCSffsANr7nDXbOeFXVdd28QjfHBt0GEyLmwV5NMjuUX541ldfSUr3hULDTOR5FQ-KgIgu0vCX5iwc1uDvMnCt7NTQ3tEIYRWHCLlXMJMcSiwgNiXiBJqKgl03-cj0/s1600-h/picture113.jpg"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5293341971147398098" style="WIDTH: 232px; CURSOR: hand; HEIGHT: 320px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgm8HgJFtbfPpQffuCSffsANr7nDXbOeFXVdd28QjfHBt0GEyLmwV5NMjuUX541ldfSUr3hULDTOR5FQ-KgIgu0vCX5iwc1uDvMnCt7NTQ3tEIYRWHCLlXMJMcSiwgNiXiBJqKgl03-cj0/s320/picture113.jpg" border="0" /></span></a><span style="font-family:verdana;"><br /><br />Settings:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjx2mKnc_y0yyxMfS0QYnUeEwY9DLkE1ez3UslP8lCQniIJth_FfsukVtVjPpJJKBHNn3auovMuDiJaX1SgkgwAAE4uVuEqBwX23PbGIHbteYMun5obp5YMnlEkgLFWI9LsL3XYWqSdwxw/s1600-h/picture111.jpg"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5293343184562449010" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 276px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjx2mKnc_y0yyxMfS0QYnUeEwY9DLkE1ez3UslP8lCQniIJth_FfsukVtVjPpJJKBHNn3auovMuDiJaX1SgkgwAAE4uVuEqBwX23PbGIHbteYMun5obp5YMnlEkgLFWI9LsL3XYWqSdwxw/s320/picture111.jpg" border="0" /></span></a><span style="font-family:verdana;"><br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAyfXiufGP3nnv5l3zzLUCyxmK71Qsm-K6W45A-y2UnI4lmbydjD2zJrCGVSlRvUiu2eCHZpEQIc3SHNqL-PrkcfChtSW7UzSKvkaf9a7f3wUAhWwsuME_iFpNAC0LmXJuyLJTPI03Mk8/s1600-h/picture112.jpg"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5293343285137234338" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 276px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAyfXiufGP3nnv5l3zzLUCyxmK71Qsm-K6W45A-y2UnI4lmbydjD2zJrCGVSlRvUiu2eCHZpEQIc3SHNqL-PrkcfChtSW7UzSKvkaf9a7f3wUAhWwsuME_iFpNAC0LmXJuyLJTPI03Mk8/s320/picture112.jpg" border="0" /></span></a><span style="font-family:verdana;"><br /><br />Test in Answers:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsvjLqDGQpYjP_A9xbsITZnhJEBtN0NfvJYi4lrW0X0PVqEWvDHZzVG0HkTeP0QT5qcspor7kMG0hvWfOCXAz0Ghz8Odg4DOYdGYp0vi0rLYE6kXqwwmrFo0wFkZoJb7MWFrAl7EWrrEM/s1600-h/picture114.jpg"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5293344147655431106" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 145px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsvjLqDGQpYjP_A9xbsITZnhJEBtN0NfvJYi4lrW0X0PVqEWvDHZzVG0HkTeP0QT5qcspor7kMG0hvWfOCXAz0Ghz8Odg4DOYdGYp0vi0rLYE6kXqwwmrFo0wFkZoJb7MWFrAl7EWrrEM/s320/picture114.jpg" border="0" /></span></a><span style="font-family:verdana;"><br /><br />Result:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNTCHm8fMTwMYH3Tz8d-CHAnaSANF-Jpja4BM2_Art6cJYVdwI5LkwPQ84ukCk-vZ-4DKfVC1StVkwpi36tJ_qwu-ddoxmPoh6K_LOMdkz2T3RktMrnPvUar7ovg6b-TpURFj4S_jTrfA/s1600-h/picture115.jpg"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5293345737096802450" style="WIDTH: 290px; CURSOR: hand; HEIGHT: 104px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNTCHm8fMTwMYH3Tz8d-CHAnaSANF-Jpja4BM2_Art6cJYVdwI5LkwPQ84ukCk-vZ-4DKfVC1StVkwpi36tJ_qwu-ddoxmPoh6K_LOMdkz2T3RktMrnPvUar7ovg6b-TpURFj4S_jTrfA/s320/picture115.jpg" border="0" /></span></a><span style="font-family:verdana;"><br /><br />NQQuery.log:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjE0h9L_s_tshF4HrYmtiDi0SyFsLwm-hIUbIaJ0c9uqOZ6-hdZuhjfovXM4zAAVb7e__BBLGEjfcdHBOJrGSNFaAeTwb4LL5Fa1TDEvEtNmgMZffHO_pu43WrB7DrDS20bZCuL2FgeBls/s1600-h/picture116.jpg"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5293346099864412562" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 205px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjE0h9L_s_tshF4HrYmtiDi0SyFsLwm-hIUbIaJ0c9uqOZ6-hdZuhjfovXM4zAAVb7e__BBLGEjfcdHBOJrGSNFaAeTwb4LL5Fa1TDEvEtNmgMZffHO_pu43WrB7DrDS20bZCuL2FgeBls/s320/picture116.jpg" border="0" /></span></a><span style="font-family:verdana;"><br /><br />We see that UNION ALL is generated.<br /><br />If we choose:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_vO2GUxYwNjLwx8RYcqCUpEReQrA8evMdmsYCf_grOrsFdJP7UsLzpRa2OrJ_HPqq9nZ4O6SKoODpI1EjOG19c6upX4sCZurL717Utyn82azFlyfiB5KJ7QFJGyCjLdgagshryXMJaZo/s1600-h/picture117.jpg"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5293346983033784722" style="WIDTH: 210px; CURSOR: hand; HEIGHT: 32px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_vO2GUxYwNjLwx8RYcqCUpEReQrA8evMdmsYCf_grOrsFdJP7UsLzpRa2OrJ_HPqq9nZ4O6SKoODpI1EjOG19c6upX4sCZurL717Utyn82azFlyfiB5KJ7QFJGyCjLdgagshryXMJaZo/s320/picture117.jpg" border="0" /></span></a><span style="font-family:verdana;"><br /><br />NQQuery.log:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjX5r8RTSp3fqEr3SruNtImn8_rpvweiAIDgd7rh1TW3d0guLTs9JqcNKyfmRRD4cy3I_nOr-R0sRoQwMPKU2sIxRi6BRlRZbJ8L0OF3KimG6o4DG5a34c9_ZWkJNC3lS3wPPUFvO80cuM/s1600-h/picture118.jpg"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5293347526154201010" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 82px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjX5r8RTSp3fqEr3SruNtImn8_rpvweiAIDgd7rh1TW3d0guLTs9JqcNKyfmRRD4cy3I_nOr-R0sRoQwMPKU2sIxRi6BRlRZbJ8L0OF3KimG6o4DG5a34c9_ZWkJNC3lS3wPPUFvO80cuM/s320/picture118.jpg" border="0" /></span></a><span style="font-family:verdana;"><br /><br />We see that the SQL is using only the second fragmented logical table source and the condition is applied only for that logical table source.<br /><br />If we choose:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgclljzUDRp5iUeVNoTv5blGrKRFH5it2PNcHnUPd2q-Fu-d_a4fs02sFE4N0mi0jnLjffMtG3AVQTO4kUGLED1SDnOvZPXhZTTOmhkWfJyLqQJ1noFgPWpdGvz8MX6tXHahFKaVwuJ1uo/s1600-h/picture119.jpg"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5293348736400064930" style="WIDTH: 282px; CURSOR: hand; HEIGHT: 32px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgclljzUDRp5iUeVNoTv5blGrKRFH5it2PNcHnUPd2q-Fu-d_a4fs02sFE4N0mi0jnLjffMtG3AVQTO4kUGLED1SDnOvZPXhZTTOmhkWfJyLqQJ1noFgPWpdGvz8MX6tXHahFKaVwuJ1uo/s320/picture119.jpg" border="0" /></span></a><span style="font-family:verdana;"><br /><br />NQQuery.log:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEja3xmdoa1z97eIFbubIhhySAcwG-RzCX_uTwjNVP2EbJHtg_Jr1VqQYc4h5oTzF0lbcmeK71ptDFM2C-R9f8GPLn5UbAamOuWOXNrJ5WqT3XC3woOcsMLzuBTtI2umQm1cn1grB8AqMJ8/s1600-h/picture120.jpg"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5293349382536553250" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 84px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEja3xmdoa1z97eIFbubIhhySAcwG-RzCX_uTwjNVP2EbJHtg_Jr1VqQYc4h5oTzF0lbcmeK71ptDFM2C-R9f8GPLn5UbAamOuWOXNrJ5WqT3XC3woOcsMLzuBTtI2umQm1cn1grB8AqMJ8/s320/picture120.jpg" border="0" /></span></a><span style="font-family:verdana;"><br /><br />If we now choose any other attribut (CHANNEL_CLASS) that is not CHANELL_ID which we used as a fragmentation key:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-hrbMr3GYfhUHMiR35Lnb91htisSTUO3Qw2f-F5NzU4v4E7CZ-Ku8h4SQ6jyFpxk0gZmQ7Uizhtosf9Se6MuGHUc-LnSIa31Gj8-bAIgfNJMLvuimu9QGdMuftee-i8yDo_MDEq6DKhI/s1600-h/picture121.jpg"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5293359235321842482" style="WIDTH: 284px; CURSOR: hand; HEIGHT: 35px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-hrbMr3GYfhUHMiR35Lnb91htisSTUO3Qw2f-F5NzU4v4E7CZ-Ku8h4SQ6jyFpxk0gZmQ7Uizhtosf9Se6MuGHUc-LnSIa31Gj8-bAIgfNJMLvuimu9QGdMuftee-i8yDo_MDEq6DKhI/s320/picture121.jpg" border="0" /></span></a><span style="font-family:verdana;"><br /><br />Then this condition is applied on both logical table sources CHANNEL and CHANNEL_OTHER:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgffAc46ZihMVP7eLKIWU4E-04rxPfSZ2XgRFrg_8QcaVkc4nLYlgjQczdyLSte2OGlDlZvVdNu_F1Ko8lkFJtQEZzTO36dwwDfZML-EdrZT0Sn9KeDZXi11JIVtylZIpWljPwhKzw_SyI/s1600-h/picture122.jpg"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5293359680103459250" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 139px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgffAc46ZihMVP7eLKIWU4E-04rxPfSZ2XgRFrg_8QcaVkc4nLYlgjQczdyLSte2OGlDlZvVdNu_F1Ko8lkFJtQEZzTO36dwwDfZML-EdrZT0Sn9KeDZXi11JIVtylZIpWljPwhKzw_SyI/s320/picture122.jpg" border="0" /></span></a><span style="font-family:verdana;"><br /><br /><strong>Fragmentation of fact table</strong><br /><br />Let's split data for SALES 1998 in separate table SALES_HIST. Data from 1998 we leave in SALES.<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRM92ToV6UD7gKcOE2kvMYLaY6-QCUAmcibkU9XXW6j4bZ8PrjQok59km8Clsc8jB3r49nspuoMwDYsBnfhf31wXICqOiuNosgQ__fcq0nGz8Vbi6ZQxhnqJHFT5obtB_HAAoDmd7Ikso/s1600-h/picture122.jpg"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5293370054990151474" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 158px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRM92ToV6UD7gKcOE2kvMYLaY6-QCUAmcibkU9XXW6j4bZ8PrjQok59km8Clsc8jB3r49nspuoMwDYsBnfhf31wXICqOiuNosgQ__fcq0nGz8Vbi6ZQxhnqJHFT5obtB_HAAoDmd7Ikso/s320/picture122.jpg" border="0" /></span></a><span style="font-family:verdana;"><br /><br />Physical model, join:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-dKsdGU3ToN-Kwd4bBWrU_VqdmceGASGdt2KuTgIkARefm-QcHk0PfxAI9aLI4c8fIzH0p0z7VfivQ3OFeADYIjXLlXo_a3y2pip0_unRgG75jLG1lpgbrAqN1QIKktgj7KQuig_q0Ow/s1600-h/picture123.jpg"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5293370614499476450" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 208px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-dKsdGU3ToN-Kwd4bBWrU_VqdmceGASGdt2KuTgIkARefm-QcHk0PfxAI9aLI4c8fIzH0p0z7VfivQ3OFeADYIjXLlXo_a3y2pip0_unRgG75jLG1lpgbrAqN1QIKktgj7KQuig_q0Ow/s320/picture123.jpg" border="0" /></span></a><span style="font-family:verdana;"><br /><br />SALES.TIME_ID >- TIMES.TIME_ID<br />SALES_HIST.TIME_ID >- TIMES.TIME_ID<br /><br />BMM:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsnWRkatrX9ZGI-zmaq5_Frdn637IWG8Vw5Rr0uk62ciKS4tXU36scQZWuYJop5BNZNVRB-2AW0FBRdZHLUIDiNaZRLZRMk2ei-3NKXIH4B62w63yH5SJhaasDo1jGVil8cnEGoeKAd0Q/s1600-h/picture124.jpg"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5293371655018206498" style="WIDTH: 240px; CURSOR: hand; HEIGHT: 320px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsnWRkatrX9ZGI-zmaq5_Frdn637IWG8Vw5Rr0uk62ciKS4tXU36scQZWuYJop5BNZNVRB-2AW0FBRdZHLUIDiNaZRLZRMk2ei-3NKXIH4B62w63yH5SJhaasDo1jGVil8cnEGoeKAd0Q/s320/picture124.jpg" border="0" /></span></a><span style="font-family:verdana;"><br /><br />Settings (for a fragmentation key we choose CALENDAR_YEAR):<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhg-cnj6AiBEXIi_TVKeQqvYFb1vDtppL1FO06hIl9s_4O5JBhZVBeZYfY9w8HZqoLe-rAmyIXr1mw_XbVZLIIQ8gf7mtaOe1OoySC1M1kJGOzYmhlDCqOaOONx-ImZbdiCLH-1zIsCHUs/s1600-h/picture125.jpg"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5293392850573878530" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 276px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhg-cnj6AiBEXIi_TVKeQqvYFb1vDtppL1FO06hIl9s_4O5JBhZVBeZYfY9w8HZqoLe-rAmyIXr1mw_XbVZLIIQ8gf7mtaOe1OoySC1M1kJGOzYmhlDCqOaOONx-ImZbdiCLH-1zIsCHUs/s320/picture125.jpg" border="0" /></span></a><span style="font-family:verdana;"><br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhl4XCEH8HNyWlIu__97U-GsID0sCTw1mlmL3W5YKFJuTdfn-cbOBD3MtWkwi_djr4YHA_MfgcXYlCEyt2pl89wW2Lna9ccaHReohQgLvZVsdHd8M3_mBhdihgLJR8M6gXR8Nb7F3H15Ao/s1600-h/picture126.jpg"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5293393160164510962" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 278px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhl4XCEH8HNyWlIu__97U-GsID0sCTw1mlmL3W5YKFJuTdfn-cbOBD3MtWkwi_djr4YHA_MfgcXYlCEyt2pl89wW2Lna9ccaHReohQgLvZVsdHd8M3_mBhdihgLJR8M6gXR8Nb7F3H15Ao/s320/picture126.jpg" border="0" /></span></a><span style="font-family:verdana;"><br /><br />Test in Answers:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEju2owy5S64Ts6O3TWVcwYlKUK9BCLXNhG5XHiiNbpGCZJZrEfcTcCPgf0Xekz6cLuP0IM960VOgxUp3B7SXTS1BmkUpIjHGSOTH_pIMJe-svzpo42r-SrCU9b6svALrgS0UzuO5GmAZzI/s1600-h/picture127.jpg"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5293394350270146082" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 147px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEju2owy5S64Ts6O3TWVcwYlKUK9BCLXNhG5XHiiNbpGCZJZrEfcTcCPgf0Xekz6cLuP0IM960VOgxUp3B7SXTS1BmkUpIjHGSOTH_pIMJe-svzpo42r-SrCU9b6svALrgS0UzuO5GmAZzI/s320/picture127.jpg" border="0" /></span></a><span style="font-family:verdana;"><br /><br />Result:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_zP3Eu55tJB2F_C_x2C52WzFaTtGqcDqZLsRqVL4cfPPb4Y_tRkSa61MPrD094AqRrXYXNRafCnCBSn8ZaVPDfNXKFaxqWV-gJ3WyN_z0wbujicrq0NpYsXhizaS09sVkdxgp_2vcSJk/s1600-h/picture128.jpg"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5293394781971572914" style="WIDTH: 288px; CURSOR: hand; HEIGHT: 121px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_zP3Eu55tJB2F_C_x2C52WzFaTtGqcDqZLsRqVL4cfPPb4Y_tRkSa61MPrD094AqRrXYXNRafCnCBSn8ZaVPDfNXKFaxqWV-gJ3WyN_z0wbujicrq0NpYsXhizaS09sVkdxgp_2vcSJk/s320/picture128.jpg" border="0" /></span></a><span style="font-family:verdana;"><br /><br />NQQuery.log:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh43FcEbXed4PWQcIhSJVUZ65FyphgSsxjJ5WNzgoU-3sDb-ZVtDL2rtubifzlTEIdAahsxxPG3uk8tN1BabeLvRLGI3gnNt1iOfWXLjbHBKPyDffDU30Y6sZIqPnHcd2Ppu0SZtAPmrFs/s1600-h/picture129.jpg"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5293395255441901122" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 198px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh43FcEbXed4PWQcIhSJVUZ65FyphgSsxjJ5WNzgoU-3sDb-ZVtDL2rtubifzlTEIdAahsxxPG3uk8tN1BabeLvRLGI3gnNt1iOfWXLjbHBKPyDffDU30Y6sZIqPnHcd2Ppu0SZtAPmrFs/s320/picture129.jpg" border="0" /></span></a><span style="font-family:verdana;"><br /><br />If we choose:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYlAy2Uxu2Bjwq7PjNx3em8BaWTpqkdZmPj0F0teUvsr1STxAW1L4yYhkGjohEtcqSR2Ak-i32n7FF95P4isFPNKOq4Qzy8MHE0w1xs6Lm4EeNZq5g1U8NCU46lbWlF3EWNuvT27fKtYw/s1600-h/picture130.jpg"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5293395826234530914" style="WIDTH: 309px; CURSOR: hand; HEIGHT: 30px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYlAy2Uxu2Bjwq7PjNx3em8BaWTpqkdZmPj0F0teUvsr1STxAW1L4yYhkGjohEtcqSR2Ak-i32n7FF95P4isFPNKOq4Qzy8MHE0w1xs6Lm4EeNZq5g1U8NCU46lbWlF3EWNuvT27fKtYw/s320/picture130.jpg" border="0" /></span></a><span style="font-family:verdana;"><br /><br />NQQuerylog:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTer3sgDbeSj0WHUJvhlooL-5TxHR7N6HDVkt2dF_tw_EnayKi4ZSth2mwJ8Dkhjn3BF9bfWJx26JHPw2YQLWqcSISOGq5_YvpdvKJfjmoI6eZP8lUHMe6Orsg9bPsDGXxMWagZlIQ0t4/s1600-h/picture131.jpg"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5293396240290941826" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 112px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTer3sgDbeSj0WHUJvhlooL-5TxHR7N6HDVkt2dF_tw_EnayKi4ZSth2mwJ8Dkhjn3BF9bfWJx26JHPw2YQLWqcSISOGq5_YvpdvKJfjmoI6eZP8lUHMe6Orsg9bPsDGXxMWagZlIQ0t4/s320/picture131.jpg" border="0" /></span></a><span style="font-family:verdana;"><br /><br />If we choose:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrjGw4IiZyYncT1q57kGHpMEF-NGVcQr_jsFGHHstsXREf-QJgzJrTpVCqPuVVtqf3gTtv1gBprCv5mRmtFn0XcPkXLXR1xVRSwxET_CajhJCOXLVgXdB8loSWmxW9EM-kcVMkySNVkOI/s1600-h/picture132.jpg"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5293396735936865522" style="WIDTH: 263px; CURSOR: hand; HEIGHT: 28px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrjGw4IiZyYncT1q57kGHpMEF-NGVcQr_jsFGHHstsXREf-QJgzJrTpVCqPuVVtqf3gTtv1gBprCv5mRmtFn0XcPkXLXR1xVRSwxET_CajhJCOXLVgXdB8loSWmxW9EM-kcVMkySNVkOI/s320/picture132.jpg" border="0" /></span></a><span style="font-family:verdana;"><br /><br />NQQuery.log:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgiFP5pJBhBZ_sdz2ARYFrUCrDFtNEq-kyccfcjA4ncgE_4w7xNuam5cPKrx2XvSAISvwQ-HADF3LgPnDE6b_frr6B4Ytv2CnoQcqipLtx73qdi2VcNVLPLf44YeUaEu2iT7TYoya1khBs/s1600-h/picture133.jpg"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5293397262706237234" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 112px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgiFP5pJBhBZ_sdz2ARYFrUCrDFtNEq-kyccfcjA4ncgE_4w7xNuam5cPKrx2XvSAISvwQ-HADF3LgPnDE6b_frr6B4Ytv2CnoQcqipLtx73qdi2VcNVLPLf44YeUaEu2iT7TYoya1khBs/s320/picture133.jpg" border="0" /></span></a><span style="font-family:verdana;"><br /><br />If we now choose any other attribut (CALENDAR_MONTH_DESC) that is not CALENDAR_YEAR which we used as a fragmentation key:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPYl4jk22kjR_wf_bW7pcvfZSK3sCgUFO3bzwUkXkBgPkh0GxAY9mQMQh-xS2q4QpyGq0shAmjfuHT2eTTzZPToZSi9bxC8kw1nno0Fx9zQkLs6dskdFGidNbXM6l1xMkANLpVyDkn44U/s1600-h/picture134.jpg"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5293398586650960242" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 26px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPYl4jk22kjR_wf_bW7pcvfZSK3sCgUFO3bzwUkXkBgPkh0GxAY9mQMQh-xS2q4QpyGq0shAmjfuHT2eTTzZPToZSi9bxC8kw1nno0Fx9zQkLs6dskdFGidNbXM6l1xMkANLpVyDkn44U/s320/picture134.jpg" border="0" /></span></a><span style="font-family:verdana;"><br /><br />Then this condition is applied on both logical table sources SALES and SALES_HIST:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWTtUxJTyDi-8fwJLRgjf1vB99uNnI41UehMWs9MuW0sn_s535eWa-r5lyCn_DhzJVT1EDnbJqyVsRAQ6z1pwNuH7TGm_fSzkrRpQ1SEyHLN3sWpH-ihoozo8uKBOaRWrhbYpZOGA2ABw/s1600-h/picture135.jpg"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5293399739212393986" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 199px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWTtUxJTyDi-8fwJLRgjf1vB99uNnI41UehMWs9MuW0sn_s535eWa-r5lyCn_DhzJVT1EDnbJqyVsRAQ6z1pwNuH7TGm_fSzkrRpQ1SEyHLN3sWpH-ihoozo8uKBOaRWrhbYpZOGA2ABw/s320/picture135.jpg" border="0" /></span></a><span style="font-family:verdana;"><br /><br />In this post we showed how to combine different sources of information using fragmentation option. We see that at any moment we can see which source OBIEE takes while generating code. </span>Goran Ockohttp://www.blogger.com/profile/16571461599213456839noreply@blogger.com6tag:blogger.com,1999:blog-196729317318279460.post-37983920386269090542009-01-02T18:39:00.019+01:002009-07-06T13:08:12.746+02:00Time series modelling<span style="font-family:verdana;">In this post I'll show how to implement time series functionality (month ago and year ago) manually on a physical layer using tables TIMES_MAGO i TIMES_YAGO.<br /><br /><strong>Times_mago and times_yago tables</strong><br /><br />select min(calendar_month_desc), max(calendar_month_desc) from times<br /><br />Minimal month is 1998-01 and a maximum is 2002-12.<br /><br />First, we create table TIMES_MAGO. It shows for each month days on the left side and days of the previous period on the right side, starting from 1998-02, because it's first that has a previous month.<br /><br />create table times_mago as<br />select nvl(norm.calendar_month_id,mago.calendar_month_id+1) calendar_month_id,<br />norm.calendar_month_desc,<br />norm.time_id,<br />norm.day_number_in_month,<br />mago.calendar_month_id mago_calendar_month_id,<br />mago.calendar_month_desc mago_calendar_month_desc,<br />mago.time_id mago_time_id,<br />mago.day_number_in_month mago_day_number_in_month<br />from times norm,times mago<br />where norm.day_number_in_month(+)=mago.day_number_in_month and norm.calendar_month_id(+)-1=mago.calendar_month_id<br /><br />Here is a left outer join to get days from the previous month if the previous month has more days then the current month.<br /><br />SQL returns 2002-12 on the right side and null on the left side so we don't have this because the maximum date from the left side is 2002-12, so we can delete this:<br /><br />delete from times_mago where calendar_month_id>1731--ili mago_calendar_month_desc='2002-12'<br /><br />For days that exist in the previous period and doesn't exist in the current we have null for calendar_month_desc (left side) so we need to update it so that we could use later time series functionality that we'll manually implement in our physical data model.<br /><br />update times_mago a<br />set a.calendar_month_desc=<br />(select distinct calendar_month_desc from times where calendar_month_id=a.calendar_month_id)<br /><br />Now we create table TIMES_YAGO that for each month shows it's days on the left side and days from the same month previous year on the right side, starting from 1999-01 because this month is the first that has a previous.<br /><br />create table times_yago as<br />select nvl(norm.calendar_month_id,yago.calendar_month_id+12) calendar_month_id,<br />norm.calendar_month_desc,<br />norm.time_id,<br />norm.day_number_in_month,<br />yago.calendar_month_id yago_calendar_month_id,<br />yago.calendar_month_desc yago_calendar_month_desc,<br />yago.time_id yago_time_id,<br />yago.day_number_in_month yago_day_number_in_month<br />from times norm, times yago<br />where norm.day_number_in_month(+)=yago.day_number_in_month and norm.calendar_month_id(+)-12=yago.calendar_month_id<br /><br />Here is a left outer join to get days from the same month previous year if it has more days then the previous.<br /><br />SQL returns months of the 2002 year on the right side and null on the left side so we don't have this because the maximum date from the left side is 2002-12, so we can delete this:<br /><br />delete from times_yago where calendar_month_id>1731--substr(mago_calendar_month_desc,1,4)='2002'<br /><br />Update is the same as for TIMES_MAGO.<br /><br />update times_yago a<br />set a.calendar_month_desc=<br />(select distinct calendar_month_desc from times where calendar_month_id=a.calendar_month_id)<br /><br />Check:<br /><br />select * from times_mago--calendar_month_desc from 1998-02 to 2002-12<br />select * from times_yago--calendar_month_desc from 1999-01 to 2002-12<br /><br /><strong>Time series model in Administrator</strong><br /><br />We import tables into Administrator:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirnCM6njQHUxDoHtyHatorcdo-B659OgtqPDo6XiNalEzDVt-NU10XjMFYLgUfSaqJxfOfb0uXTbdlvhKW0jx1jSqt5psd85i3aFIqGoSg7JueCYd3vEPw9S1uL6Fhn8-MoScpR856lmg/s1600-h/picture73.jpg"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5287494535340646834" style="WIDTH: 400px; CURSOR: hand; HEIGHT: 380px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirnCM6njQHUxDoHtyHatorcdo-B659OgtqPDo6XiNalEzDVt-NU10XjMFYLgUfSaqJxfOfb0uXTbdlvhKW0jx1jSqt5psd85i3aFIqGoSg7JueCYd3vEPw9S1uL6Fhn8-MoScpR856lmg/s400/picture73.jpg" border="0" /></span></a><span style="font-family:verdana;"><br /><br />The idea is to have on BMM just TIMES i SALES logical tables, also with PRODUCTS dimensional table. After we imported TIMES_MAGO i TIMES_YAGO tables we make aliases for SALES table with Mago i Yago suffixes. After that we add FK from SALES Mago to TIMES_MAGO and from SALES Yago to TIMES_YAGO.<br /><br />We add PRODUCTS to a SALES and to all associated aliases. That is required if we want to see PRODUCTS attribut in WHERE or GROUP BY part of the report in all SQL queries that Oracle BI Server will generate (sales-times, sales mago-times mago, sales yago-times yago) if we choose it. For example, we add condition PROD_CATEGORY='Hardware' and this will appear in all three SQL queries. We'll show this later.<br /><br />Our physical model:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUBwqoH6LpdBd20Bz2TYZoilsAp-ZZYFmKHWq6TlGent_ZK1rybizqEAFc1WmrPyyJjqBkSl6dW_EZbzQ-gP3uYEbsY_JGngvGlAKD9OkHC6po-eotjrs42PwkNs7794fY7WABmSaTqA4/s1600-h/picture74.jpg"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5287503004390209810" style="WIDTH: 400px; CURSOR: hand; HEIGHT: 318px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUBwqoH6LpdBd20Bz2TYZoilsAp-ZZYFmKHWq6TlGent_ZK1rybizqEAFc1WmrPyyJjqBkSl6dW_EZbzQ-gP3uYEbsY_JGngvGlAKD9OkHC6po-eotjrs42PwkNs7794fY7WABmSaTqA4/s400/picture74.jpg" border="0" /></span></a><span style="font-family:verdana;"><br /><br />Foreign keys:<br /><br />PRODUCTS.PROD_ID = SALES.PROD_ID<br />PRODUCTS.PROD_ID = "SALES Mago".PROD_ID<br />PRODUCTS.PROD_ID = "SALES Yago".PROD_ID<br />TIMES.TIME_ID = SALES.TIME_ID<br />TIMES_MAGO.MAGO_TIME_ID = "SALES Mago".TIME_ID<br />TIMES_YAGO.YAGO_TIME_ID = "SALES Yago".TIME_ID<br /><br />We create a new model in BMM and put SALES and TIMES inside it and add complex join (logical join) if it is not created automatically. Drag and drop columns AMOUNT_SOLD and QUANTITY_SOLD into SALES logical table<br /><br /><span style="color:#ff0000;">*Note that we don't have to add explicitly physical join in BMM (add physical table to logical table source option) between SALES Mago and TIMES_MAGO and between SALES Yago and TIMES_YAGO.</span><br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXdwZWZMW57hERcxm3RTY2QSPMxYgbWUgbVhNVKAseZI-_-k9MgF_J92vKBmUbwq1-nFa4AcUcSpGU8XRqdPdpy0m7vztkDMvKPtPvLoPgG22JNw479zhyknXVkDyPf70dFSiblDGsHew/s1600-h/picture75.jpg"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5287506084413289682" style="WIDTH: 400px; CURSOR: hand; HEIGHT: 204px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXdwZWZMW57hERcxm3RTY2QSPMxYgbWUgbVhNVKAseZI-_-k9MgF_J92vKBmUbwq1-nFa4AcUcSpGU8XRqdPdpy0m7vztkDMvKPtPvLoPgG22JNw479zhyknXVkDyPf70dFSiblDGsHew/s400/picture75.jpg" border="0" /></span></a><span style="font-family:verdana;"><br /><br /><span style="color:#ff0000;">*Also, if we didn't add physical join in phisical layer from TIMES_MAGO and TIMES_YAGO to TIMES how we know that if we choose for example 2001-01 month that Oracle BI Server will generate other SQL queries (for mago and </span></span><span style="font-family:verdana;"><span style="color:#ff6666;"><span style="color:#ff0000;">yago) for the choosen measure?</span><br /></span><br /><span style="color:#ff0000;">*This part we'll solve in BMM in TIMES logical table. We add TIMES_MAGO i TIMES_YAGO logical table source inside it. We want to have for example a report that will give us data for CALENDAR_MONTH_DESC so to have a data for mago and yago our column CALENDAR_MONTH_DESC need to have two more sources (from TIMES_MAGO and TIMES_YAGO). We repeat this step for CALENDAR_MONTH_ID. For this reason we did update of CALENDAR_MONTH_ID from TIMES_MAGO and TIMES_YAGO tables before. Every column for which we want to see mago and yago data must have this two additional sources. After drag and drop columns a new source will appear (this can be seen also in column properties).</span><br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgybDKokW5PE7Ocon1iBjRMCWvSLXh89fdGtzFN2-dVRB5PSXKefddSLKBRtT_ScbH5oMx5ekiBaIRhU-5dbv2WI244mDRNSVEhslgYRZkIQuW4xi-aFh12nRxl4zdAP7GECV06YTe2o0/s1600-h/picture76.jpg"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5287510863639589170" style="WIDTH: 363px; CURSOR: hand; HEIGHT: 400px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgybDKokW5PE7Ocon1iBjRMCWvSLXh89fdGtzFN2-dVRB5PSXKefddSLKBRtT_ScbH5oMx5ekiBaIRhU-5dbv2WI244mDRNSVEhslgYRZkIQuW4xi-aFh12nRxl4zdAP7GECV06YTe2o0/s400/picture76.jpg" border="0" /></span></a><span style="font-family:verdana;"><br /><br />When we choose CALENDAR_MONTH_DESC to group by or in filter, Oracle BI Server will generate three separeted SQL queries for the choosen value from TIMES-a, and reference this value to the CALENDAR_MONTH_DESC to other two queries (TIMES_MAGO, TIMES_YAGO). That's the way that OBIEE takes measure from SALES Mago and SALES Yago.<br /><br />Presentation model:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg520NPAT393oBKaNbSgYzkhxkihpg9NLz5pQnQYSmGyGlExJmg9n5USctDHuOqMadYcRhzQOxInOtf8p-qk-MN6Dad0C7N05lm1vAZuk2j5j9FjFkR99lRA_PtHqz-vxdl8Z570LqWUBY/s1600-h/picture77.jpg"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5287513776516002178" style="WIDTH: 226px; CURSOR: hand; HEIGHT: 190px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg520NPAT393oBKaNbSgYzkhxkihpg9NLz5pQnQYSmGyGlExJmg9n5USctDHuOqMadYcRhzQOxInOtf8p-qk-MN6Dad0C7N05lm1vAZuk2j5j9FjFkR99lRA_PtHqz-vxdl8Z570LqWUBY/s400/picture77.jpg" border="0" /></span></a><span style="font-family:verdana;"><br /><br /><strong>Testing in Answers</strong><br /><br />Basic test in Answers:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDiLOAQlolTEYg-XbsIpzT002hTxdhU-dGZDOG2Hk8QAKx6kv1XgPTyDT_O0qS8fEztPXUbdZq4BBNij10XdWWKqMpcCJYq0DWJaJIqAQYgqXBx4cMTiOFtpkbm7NW9KZA5WND7vqdTqQ/s1600-h/picture78.jpg"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5287526706095091682" style="WIDTH: 400px; CURSOR: hand; HEIGHT: 96px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDiLOAQlolTEYg-XbsIpzT002hTxdhU-dGZDOG2Hk8QAKx6kv1XgPTyDT_O0qS8fEztPXUbdZq4BBNij10XdWWKqMpcCJYq0DWJaJIqAQYgqXBx4cMTiOFtpkbm7NW9KZA5WND7vqdTqQ/s400/picture78.jpg" border="0" /></span></a><span style="font-family:verdana;"><br /><br />Result:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQ9LztCqL7fHu_9sN7lCZczP4Cu6wGfSfKlSFN_cScR17bCD_gS9Kgq31NHNj7mgC1SwSz5okbnocZVxcYjRy-AjNhuMuYcTOWkMLn1pNI_Mu2fiDpduF20ccI7gq1CBUrda9_eLwrc0g/s1600-h/picture79.jpg"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5287527749001575362" style="WIDTH: 301px; CURSOR: hand; HEIGHT: 400px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQ9LztCqL7fHu_9sN7lCZczP4Cu6wGfSfKlSFN_cScR17bCD_gS9Kgq31NHNj7mgC1SwSz5okbnocZVxcYjRy-AjNhuMuYcTOWkMLn1pNI_Mu2fiDpduF20ccI7gq1CBUrda9_eLwrc0g/s400/picture79.jpg" border="0" /></span></a><span style="font-family:verdana;"><br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgffgRn2qdbYfubfcoaqEpvlgjKlycxjxVZrO1j8s4iNoLFiU2uO30ukswcvkoGYOd4wqomwJQ2IPYagk79XeLnqkkgu22d0o0m9ochvtNysmWWSTwDVPI03MfDDs937KMaATabaiuarw/s1600-h/picture80.jpg"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5287527858010754258" style="WIDTH: 301px; CURSOR: hand; HEIGHT: 400px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgffgRn2qdbYfubfcoaqEpvlgjKlycxjxVZrO1j8s4iNoLFiU2uO30ukswcvkoGYOd4wqomwJQ2IPYagk79XeLnqkkgu22d0o0m9ochvtNysmWWSTwDVPI03MfDDs937KMaATabaiuarw/s400/picture80.jpg" border="0" /></span></a><span style="font-family:verdana;"><br /><br />Why do we get data for months that does not exist in the SALES table? The answer is that Oracle BI Server generates a full outer join to all three SQL queries if you do not select a condition under which you want to filter. Remember that in SALES minimum month is 1998-01 and the maximum is 2001-12<br /><br />NQQuery.log:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMXYx4Le4vym88tRuVa3OuZWJLlhOuaG2cWfmNvGzIshcZt-vXAhxtq6P46ZefdqeLBfKd95GMmLuWHdRiDJgk4Vs2hqLGuZxRNd_dSwVAZfkfePZQg26vOB7LLjXlefspIq4OinEKIok/s1600-h/picture81.jpg"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5287555358537755714" style="WIDTH: 400px; CURSOR: hand; HEIGHT: 314px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMXYx4Le4vym88tRuVa3OuZWJLlhOuaG2cWfmNvGzIshcZt-vXAhxtq6P46ZefdqeLBfKd95GMmLuWHdRiDJgk4Vs2hqLGuZxRNd_dSwVAZfkfePZQg26vOB7LLjXlefspIq4OinEKIok/s400/picture81.jpg" border="0" /></span></a><span style="font-family:verdana;"><br /><br />Which would looks something like this if we link those three queries with a full outer join (not in the NQQuery.log):<br /><br />SELECT c1, SUM (c2), SUM (c3), SUM (c4)<br />FROM<br />(<br />SELECT<br />DISTINCT CASE<br />WHEN d1.c2 IS NOT NULL<br />THEN d1.c2<br />WHEN d0.c2 IS NOT NULL<br />THEN d0.c2<br />WHEN d2.c2 IS NOT NULL<br />THEN d2.c2<br />END AS c1,<br />d1.c1 AS c2,<br />d0.c1 AS c3,<br />d2.c1 AS c4<br />FROM<br />(SELECT<br />SUM (t20550.amount_sold) AS c1,<br />t20553.calendar_month_desc AS c2<br />FROM times t20553, sales t20550<br />WHERE (t20550.time_id = t20553.time_id)<br />GROUP BY t20553.calendar_month_desc) d1<br />FULL OUTER JOIN<br />(SELECT<br />t21046.calendar_month_desc AS c2,<br />SUM (t20551.amount_sold) AS c1<br />FROM sales t20551 /* SALES Mago */, times_mago t21046<br />WHERE (t20551.time_id = t21046.mago_time_id)<br />GROUP BY t21046.calendar_month_desc) d0<br />ON (d1.c2 = d0.c2)<br />FULL OUTER JOIN<br />(SELECT<br />t21046.calendar_month_desc AS c2,<br />SUM (t20551.amount_sold) AS c1<br />FROM sales t20551 /* SALES Yago */, times_yago t21046<br />WHERE (t20551.time_id = t21046.yago_time_id)<br />GROUP BY t21046.calendar_month_desc) d2<br />ON d1.c2 = d2.c2<br />ORDER BY c1)<br />GROUP BY c1<br />ORDER BY 1<br /><br />If we don't want to get months that don't exist in the SALES we can define a repository variable (maximum month) and set a filter in the Administrator to TIMES, TIMES _MAGO and TIMES_YAGO:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgw2zav5AfTgrg5c0YmNRAjwZdGViI-ozYnFQw5o1clGYi1BZPOWP8haQ1cj-pGhOfWUmS4k0fZ0Djxfe8L6eA_AMVbc5i9uIl2PiKvhsyb29drzOYQCqMSpdD5aZja50Z4cR0O-54DdD0/s1600-h/picture88.jpg"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5287561955086190882" style="WIDTH: 359px; CURSOR: hand; HEIGHT: 400px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgw2zav5AfTgrg5c0YmNRAjwZdGViI-ozYnFQw5o1clGYi1BZPOWP8haQ1cj-pGhOfWUmS4k0fZ0Djxfe8L6eA_AMVbc5i9uIl2PiKvhsyb29drzOYQCqMSpdD5aZja50Z4cR0O-54DdD0/s400/picture88.jpg" border="0" /></span></a><span style="font-family:verdana;"><br /><br />Repeat this for TIMES_MAGO and TIMES_YAGO:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipX9vhyphenhyphenglM81TgTSkexmNmJgIOxeJGCaxp6l-7VM6K_OoNz2FglPU3BHHEi7RvKUU7O2HR62nvRuIcI40hd2tcWO2T5WCqfVWe5qjFBAZ1tABqrEvMN5qBcUCG3SniSPJmKmO2FsiwHgc/s1600-h/picture89.jpg"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5287565354783778386" style="WIDTH: 400px; CURSOR: hand; HEIGHT: 344px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipX9vhyphenhyphenglM81TgTSkexmNmJgIOxeJGCaxp6l-7VM6K_OoNz2FglPU3BHHEi7RvKUU7O2HR62nvRuIcI40hd2tcWO2T5WCqfVWe5qjFBAZ1tABqrEvMN5qBcUCG3SniSPJmKmO2FsiwHgc/s400/picture89.jpg" border="0" /></span></a><span style="font-family:verdana;"><br /><br />Now we get only months that we have in SALES (till 2001-12):<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFibieNPn738mR1mvEEGAwjjVU2gXNiRmS_YnfJu9T546lFjdMTjlPRyMlxQ4Gqa4E71VUaEo5BcLVRhsGnBgafXV2ywCPDee9YNrpIV5aY3p7SzN9Zm94-zSyhjer8PZen4bMwuT0o6g/s1600-h/picture90.jpg"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5287832848781215154" style="WIDTH: 269px; CURSOR: hand; HEIGHT: 320px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFibieNPn738mR1mvEEGAwjjVU2gXNiRmS_YnfJu9T546lFjdMTjlPRyMlxQ4Gqa4E71VUaEo5BcLVRhsGnBgafXV2ywCPDee9YNrpIV5aY3p7SzN9Zm94-zSyhjer8PZen4bMwuT0o6g/s320/picture90.jpg" border="0" /></span></a><span style="font-family:verdana;"><br /><br />NQQuery.log:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKT4Tqi4zRjkTcHxAyLgqcuZumSSihiRe-piCSNtskuzQF_yQA0wDu6J1Hl2Nybq_iQcP1aiWERjB-CmLtTI9P_foabLT9GSu26Zs9NOwFHRsFs17dQSO6kBSq4xED4Zn9AEZc3JWwA_c/s1600-h/picture91.jpg"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5287833479670353970" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 209px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKT4Tqi4zRjkTcHxAyLgqcuZumSSihiRe-piCSNtskuzQF_yQA0wDu6J1Hl2Nybq_iQcP1aiWERjB-CmLtTI9P_foabLT9GSu26Zs9NOwFHRsFs17dQSO6kBSq4xED4Zn9AEZc3JWwA_c/s320/picture91.jpg" border="0" /></span></a><span style="font-family:verdana;"><br /><br />If we don't group by months, but only by PROD_CATEGORY and choose measures AMOUNT_SOLD_MAGO and AMOUNT_SOLD_YAGO then we will get the same amount for all three measures, because we did not select CALENDAR_MONTH_DESC, so the right part of the model didn't activate (TIMES, TIMES_MAGO, TIMES_YAGO).<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCJbLOE0yOXMgHirqyxm6vTA32b4CjJlodNI8OIyCAPieNejvD4VJFie4MwDHZupQwEV7yStnTU9eWR86vb6o2NoYnI-w0XdRLXeQl5uneJPs2cRQWX92ImVY6b5_1-Q8MuQGvCrlyHNQ/s1600-h/picture92.jpg"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5287838577334058338" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 135px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCJbLOE0yOXMgHirqyxm6vTA32b4CjJlodNI8OIyCAPieNejvD4VJFie4MwDHZupQwEV7yStnTU9eWR86vb6o2NoYnI-w0XdRLXeQl5uneJPs2cRQWX92ImVY6b5_1-Q8MuQGvCrlyHNQ/s320/picture92.jpg" border="0" /></span></a><span style="font-family:verdana;"><br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3mCLLsust15k2alySJSBiik-CFvuWulhAD6cv8xh3HNFKE6cVfwcHJJ-z5GXxWZH6pM1khYfwqe96GhUbvtuLSkdMJGP-7BQz6HW3dnwpfeRNWPWi8P4CEfBzRNoBSdwZwCKkBIgum_I/s1600-h/picture93.jpg"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5287839339075413138" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 222px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3mCLLsust15k2alySJSBiik-CFvuWulhAD6cv8xh3HNFKE6cVfwcHJJ-z5GXxWZH6pM1khYfwqe96GhUbvtuLSkdMJGP-7BQz6HW3dnwpfeRNWPWi8P4CEfBzRNoBSdwZwCKkBIgum_I/s320/picture93.jpg" border="0" /></span></a><span style="font-family:verdana;"><br /><br />In case that we group by months, it will reference itself on TIMES, TIMES_MAGO and TIMES_YAGO:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjiIDw55v-64sjAmYvYmpyL4YSHSVH1Ds4bfzKJ-_PGOD6QA6uSQQPkQY40uk0hIxZpGXn45QMyUZ3_ohxqUwGCt7jvKFKhWsOmdt26dW-1fLoIJtcwX6Be7oIOm5nXK6-drTPTWvtwn0s/s1600-h/picture94.jpg"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5287845930157468194" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 30px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjiIDw55v-64sjAmYvYmpyL4YSHSVH1Ds4bfzKJ-_PGOD6QA6uSQQPkQY40uk0hIxZpGXn45QMyUZ3_ohxqUwGCt7jvKFKhWsOmdt26dW-1fLoIJtcwX6Be7oIOm5nXK6-drTPTWvtwn0s/s320/picture94.jpg" border="0" /></span></a><span style="font-family:verdana;"><br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgoTP_NXZqhPy9CkbxDoatodU7d9gVxa-YWSGSeryWs4Qjb9FW1IdWNr7yO33Eb6l2YS116ylKPHX760wSyxBLdBabJZZ8QX2F8v0tPF1XlsTXV_7rzSXQTZFV28_W6Hggpf5uyrgwAhXY/s1600-h/picture95.jpg"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5287846167771361314" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 270px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgoTP_NXZqhPy9CkbxDoatodU7d9gVxa-YWSGSeryWs4Qjb9FW1IdWNr7yO33Eb6l2YS116ylKPHX760wSyxBLdBabJZZ8QX2F8v0tPF1XlsTXV_7rzSXQTZFV28_W6Hggpf5uyrgwAhXY/s320/picture95.jpg" border="0" /></span></a><span style="font-family:verdana;"><br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhuokEQk_0DHPqaa4apOPhmJB33i2R5JPpupHv2PX_B1IfvjuafQz4aCXxT0gNpyAa940naQGub9fd2FAJueLe67aWtgy-1LRen3X69GPH6Syc3H7prWT6S04krr6sUalmyGfdSvR3Z2YY/s1600-h/picture96.jpg"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5287846980227123954" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 264px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhuokEQk_0DHPqaa4apOPhmJB33i2R5JPpupHv2PX_B1IfvjuafQz4aCXxT0gNpyAa940naQGub9fd2FAJueLe67aWtgy-1LRen3X69GPH6Syc3H7prWT6S04krr6sUalmyGfdSvR3Z2YY/s320/picture96.jpg" border="0" /></span></a><span style="font-family:verdana;"><br /><br />And that is correct, as long as we group by months we get the correct results for time series measures.<br /><br />Now we remove repository variable v_maks_mjesec from all filters in Administrator and drag column CALENDAR_YEAR from a BMM to presentation layer.<br /><br />In Answers kmake a report and put a filter on CALENDAR_YEAR (note that CALENDAR_YEAR is only from TIMES logical table source):<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicRPv42Ewocr1H3-LgLulYZ_cupRoWoJ-WN_Nb4Bh8X1KUkRODms_KVKr7QsBD4-hrCQyPmARRbvYpnQaEq8OHDY52VtVvbZEU_uHHYEKRXYEg9dFvDXw3gBi0lmejgZuQfdPHu6d59Ik/s1600-h/picture97.jpg"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5287858901709355874" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 131px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicRPv42Ewocr1H3-LgLulYZ_cupRoWoJ-WN_Nb4Bh8X1KUkRODms_KVKr7QsBD4-hrCQyPmARRbvYpnQaEq8OHDY52VtVvbZEU_uHHYEKRXYEg9dFvDXw3gBi0lmejgZuQfdPHu6d59Ik/s320/picture97.jpg" border="0" /></span></a><span style="font-family:verdana;"><br /><br />Results:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgb8zxyZINemQvNGE-WdN7hIEppAOIOn34umE5tYw7LjAD0zLjwv1Mw_J52gN5ilVs4yb-V4CKnhoC9UGuRB0Z0YobwaDQwLRGeeeuN3BrS4cgrXQo1ku6RmBWBvm_3IURbjFp9IoT48KY/s1600-h/picture98.jpg"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5287859785312229730" style="WIDTH: 213px; CURSOR: hand; HEIGHT: 320px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgb8zxyZINemQvNGE-WdN7hIEppAOIOn34umE5tYw7LjAD0zLjwv1Mw_J52gN5ilVs4yb-V4CKnhoC9UGuRB0Z0YobwaDQwLRGeeeuN3BrS4cgrXQo1ku6RmBWBvm_3IURbjFp9IoT48KY/s320/picture98.jpg" border="0" /></span></a><span style="font-family:verdana;"><br /><br />NQQuery.log:<br /><br /></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJ-UX4ObRJY2Vprpfjt9ySpZemaZrYy3VvO8U0rlBrjyWO1Sn0j4vshY96eK3mKyfp5dDGQqs5VufZwZ4Ve42lPReL9wW1fePOsZmExFEIYQN7GbEZBkCbUeS7p47PX2hTc4900BnmJEM/s1600-h/picture99.jpg"><span style="font-family:verdana;"><img id="BLOGGER_PHOTO_ID_5287860415214391442" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 259px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJ-UX4ObRJY2Vprpfjt9ySpZemaZrYy3VvO8U0rlBrjyWO1Sn0j4vshY96eK3mKyfp5dDGQqs5VufZwZ4Ve42lPReL9wW1fePOsZmExFEIYQN7GbEZBkCbUeS7p47PX2hTc4900BnmJEM/s320/picture99.jpg" border="0" /></span></a><span style="font-family:verdana;"><br />We can see that by selecting an attribute that exists only in the TIMES, filter is applied only to the first request (TIMES) and Oracle BI Server generates a left join on other two queries, so in this case we do not have a full outer join.</span>Goran Ockohttp://www.blogger.com/profile/16571461599213456839noreply@blogger.com0