Receive updates about the latest news

Subscribe to our newsletter

Do not miss any updates about Miaz-Tech valuable articles, publications, newsletters and event invitations.

    • What is dbt_artifacts?

      dbt_artifacts is a package for modeling a dbt project and its run metadata. It includes the following models to help you understand the current state of a dbt project and its performance over time. It...

    • Data migration from the Salesforce to snowflake Data warehouse by using Matillion

      Purpose of the Article: This blog explains how to load the data from Salesforce to Snowflake Intended Audience: This article will help our Organizational level kind of developers working on data migra...

    • WiMAX-A Study of Mobility

      1. Introduction The wireless market is growing rapidly; being pushed through wireless connectivity demand various wireless connectivity means are emerging (WLAN/802.11, WMAN/802.16a, WWAN/802.16d) [IE...

    • Weblogic Upgrade

      Patch Name wls1036_upgrade_generic.jar Reference https://www.youtube.com/watch?v=Be6hrYTANQE Just Click Next and Next MAKE SURE ALL OBIEE SERVICES ARE DOWN AND CLOSED IN PROCESS Open CMD prompt C:Mid...

    Tags

    bics installation OBIEE obiee 11g installation guide Oracle

    Categories

    Selecting columns dynamically

    a

    Selecting columns dynamically

    In previous post I talked about column selectors. They are not enough in complex cases, for example:
    • Single selection of columns for several reports.
    • Using the same column selection in several columns of the same analysis.
    • Dependency between selection of columns (for example, I can select “Target Revenue” in measures only if “Year” selected in one of the dimensions.)
    In this post I will create an example where selecting a column from prompt would influence 2 columns in analysis.
    First I create a Dashboard Prompt:

     

    All I want is to create a presentation variable, I will name P_col1, so I add a new Variable prompt (and not a Column Prompt).
    There I will select Presentation Variable and it’s name (P_col1) the Label and the user input format. Here you can select whatever you like, just make sure user can select only one value. I selected a “Radio Buttons” option.
    Next I add Custom Values. It is important that those Custom Values will be exactly the same way those columns appear in the column Formula. For example this is the Formula of the “Offices”.”Department” column:
    and this is the Prompt definition (I selected the Year, Product Type and Department columns):
    The last thing I did was to select a specific value as default selection (this is important).
    This is the resulting prompt:
    Now i will create an Analysis that uses the above described presentation Variable and place them both in a Dashboard.
    First I will create an equivalent to a column selector:
    In the formula I create a presentation variable with a default value:
    the result in my case is: @{P_col1}{“Time”.”Per Name Year”}
    I’ll add few more columns:
    And this is the result:
    I could do exactly the same with column selector. Now, for fun,  lets add something I couldn’t do with column selector: I’ll add a measure that will show “Discount Amount” if the “Per Name Year” was selected and “Billed Quantity” otherwise.
    So my extra column will have the formula:
     CASE WHEN ‘@{P_col1}{“Time”.”Per Name Year”}’='”Time”.”Per Name Year”‘ THEN “Base Facts”.”Discount Amount” ELSE “Base Facts”.”Billed Quantity”  END
    This part I couldn’t do with column selectors.
    Now I’ll place both in a dashboard:

     

     You might have noticed the first column name didn’t change after I selected the “Product Type”. We didn’t have this issue with column selectors.
    To fix it I’ll place the Presentation Variable in the Column Heading:
    Now the result header is dynamic:
    While developers might be happy with the described above, users and UI / UX people might not share my enthusiasm with headers and Prompt Values such as “Time”.”Per Name Year” and column header such as Measure2.
    Warning: Array to string conversion in /volume1/web/wordpress/wp-includes/link-template.php on line 2361 Call Stack: 0.0001 361096 1. {main}() /volume1/web/wordpress/index.php:0 0.0001 361408 2. require('/volume1/web/wordpress/wp-blog-header.php') /volume1/web/wordpress/index.php:17 3.5216 18718304 3. require_once('/volume1/web/wordpress/wp-includes/template-loader.php') /volume1/web/wordpress/wp-blog-header.php:19 3.5455 18729272 4. include('/volume1/web/wordpress/wp-content/themes/ayro/single.php') /volume1/web/wordpress/wp-includes/template-loader.php:106 4.0942 20686624 5. ayro_qodef_get_blog_single() /volume1/web/wordpress/wp-content/themes/ayro/single.php:9 4.0944 20687000 6. ayro_qodef_get_module_template_part($template = 'templates/single/holder', $module = 'blog', $slug = '', $params = ['sidebar' => 'default']) /volume1/web/wordpress/wp-content/themes/ayro/framework/modules/blog/blog-functions.php:459 4.0944 20687128 7. ayro_qodef_get_template_part($template = 'framework/modules/blog/templates/single/holder', $slug = '', $params = ['sidebar' => 'default']) /volume1/web/wordpress/wp-content/themes/ayro/framework/lib/qode.functions.php:907 4.0947 20688032 8. include('/volume1/web/wordpress/wp-content/themes/ayro/framework/modules/blog/templates/single/holder.php') /volume1/web/wordpress/wp-content/themes/ayro/framework/lib/qode.functions.php:888 4.0947 20688032 9. ayro_qodef_get_single_html() /volume1/web/wordpress/wp-content/themes/ayro/framework/modules/blog/templates/single/holder.php:3 4.1976 20776240 10. ayro_qodef_get_module_template_part($template = 'templates/single/parts/single-navigation', $module = 'blog', $slug = ???, $params = ???) /volume1/web/wordpress/wp-content/themes/ayro/framework/modules/blog/blog-functions.php:523 4.1976 20776384 11. ayro_qodef_get_template_part($template = 'framework/modules/blog/templates/single/parts/single-navigation', $slug = '', $params = []) /volume1/web/wordpress/wp-content/themes/ayro/framework/lib/qode.functions.php:907 4.1978 20777720 12. include('/volume1/web/wordpress/wp-content/themes/ayro/framework/modules/blog/templates/single/parts/single-navigation.php') /volume1/web/wordpress/wp-content/themes/ayro/framework/lib/qode.functions.php:888 4.2168 20829248 13. next_post_link($format = '%link', $link = [0 => 'https://miaz-tech.com/wp-content/uploads/2016/05/shop-product-image-4.jpg', 1 => 600, 2 => 651, 3 => FALSE], $in_same_term = TRUE, $excluded_terms = '', $taxonomy = 'category') /volume1/web/wordpress/wp-content/themes/ayro/framework/modules/blog/templates/single/parts/single-navigation.php:82 4.2168 20829248 14. get_next_post_link($format = '%link', $link = [0 => 'https://miaz-tech.com/wp-content/uploads/2016/05/shop-product-image-4.jpg', 1 => 600, 2 => 651, 3 => FALSE], $in_same_term = TRUE, $excluded_terms = '', $taxonomy = 'category') /volume1/web/wordpress/wp-includes/link-template.php:2315 4.2168 20829248 15. get_adjacent_post_link($format = '%link', $link = [0 => 'https://miaz-tech.com/wp-content/uploads/2016/05/shop-product-image-4.jpg', 1 => 600, 2 => 651, 3 => FALSE], $in_same_term = TRUE, $excluded_terms = '', $previous = FALSE, $taxonomy = 'category') /volume1/web/wordpress/wp-includes/link-template.php:2296
    No Comments
    Post a Comment

    This site uses Akismet to reduce spam. Learn how your comment data is processed.