Cognos Analytics

 View Only
  • 1.  Filter TreePrompt

    Posted Fri November 11, 2022 05:14 AM
    Hi,
    i have a data structure formed like this:
    Hierarchy
      -> level1
        -> level2
    In the report i am using a tree prompt to show level1. I have also created a query which filters out some elements of level2.
    When i use the "view tabular data" i see the level1 e level2 filtered with my criteria, but when i put level1 inside the treePrompt i can see only the first level filtred and the second one entirely.
    How i can show the correct value for the second level?


    Thank you,
    Valerio

    ------------------------------
    valerio pascarella
    ------------------------------

    #CognosAnalyticswithWatson


  • 2.  RE: Filter TreePrompt

    IBM Champion
    Posted Mon November 14, 2022 01:19 PM

    Hi,

    I'm assuming the report is built over a dimensional package? Can you be a bit more specific about what you are doing? You mention filtering, but is this via a dimensional filter function in an expression, or are you using detail filters? Would the set of members you want to see in Level 2 be static, or would they change over time?

    Cheers!

    MF.



    ------------------------------
    Mark Fry
    Technical Consultant
    ------------------------------



  • 3.  RE: Filter TreePrompt

    Posted Tue November 15, 2022 02:42 AM
    Hi
    i'm using a dimensional package. This is the query that i use to filter the level:
    Where "Contesto esterno" is the level1 and "Variabili" is the level2.
    I use the detail filter to remove the wrong elements.

    After that query, i use another simple query linked to the first one to fetch the distinct items.

    Let me know if that's clear enough
    Thank you,

    Valerio 


    ------------------------------
    valerio pascarella
    ------------------------------



  • 4.  RE: Filter TreePrompt

    IBM Champion
    Posted Tue November 15, 2022 09:39 AM

    Hi,

    Using detail filters with a dimensional package something I always advise caution over. Detail filters are a relational reporting concept, and can often deliver results that are incorrect when used with a dimensional source.

    You mention originally that you are using a tree prompt? Usually you'd feed this with a set of members. It looks like you need the members at level 1 filtered based on a measure value? Do you have the same requirement for members at level 2 also?

    For filtering a set of members, rather than using a detail filter, I would suggest you use a dimensional expression for the set, eg

    filter([your set of members], [your measure] > 3)

    I'm still not clear on how you need your tree prompt to be populated, though. Can you provide more detail?

    Cheers!

    MF.



    ------------------------------
    Mark Fry
    Technical Consultant
    ------------------------------



  • 5.  RE: Filter TreePrompt

    Posted Thu November 17, 2022 04:51 AM
    Hi,
    this is the starting situation. This is my full hierarchy, with all level1 and level2 variables.

    My goal is to filter the second level with the condition mentioned, but i want to insert into the tree prompt the level1 because i want to see the tree and not a list of elements.
    The first level is not filtered, it should show only the elements that respect the criteria, like the example below.

    I tried to filter the level2 using that code: "filter([your set of members], [your measure] > 3)". It works fine for the level2 variables but if i show the first level on tree prompt i see all the variable again.
    Thank you


    ------------------------------
    valerio pascarella
    ------------------------------



  • 6.  RE: Filter TreePrompt

    IBM Champion
    Posted Thu November 17, 2022 10:07 AM

    Hi,

    I'm not sure what you are trying to do is possible with a tree prompt. You are always going to see all child members of any members you include in the prompt, so if you include members from level 1, you will see all of their children on level 2. I would suggest you use a value prompt instead, fed from the filtered set of members you need from level 2.

    Cheers!

    MF.



    ------------------------------
    Mark Fry
    Technical Consultant
    ------------------------------