Forum Discussion

Craig_Harley's avatar
Craig_Harley
Regular Visitor
3 months ago
Solved

Decomposition tree for API Hierarchy

Hi,

I am looking to show an API Consumption Hierarchy using the Decomposition Tree, however struggling to get my head around the approach

The Decomposition Tree is set out as follows

Starting at Consumer -> API URI - At this level selecting either of these nodes allows me to get the correct info displayed on the Drillthrough page

However an API can consume another API and/or a System of record (which can in turn then do the same, we have up to 4 layers)

The issue i have is that by selecting the API URI it gives me the full entry for the one selected on the drillthrough page which is the behaviour i want

When i select an API under each of the Level 0/1/2/3 nodes (as this is a different field in the same row as the API URI called consumes) it obviously still displays the API entry that is under the API URI, rather than the one selected.

Every API has a record in API URI

 

As per this example i would like 

"API URI" (API 1) consumes "Level 0" (API 2),

by selecting "Level 0" (API 2) in the decomposition tree to go to the drillthrough page

I would want to see the record for "API URI" (API 2) and not (API 1)

is there a method to achieve this?

  • Hi Craig_Harley,

     

    Thank you for the explaination, based on it i've created a sample .pbix file.

     

    I've added another table to map the URI and consumes and then added calculated columns for all levels in the raw table.

     

    this is just an example and you can tweak it as per your requirment to get desired details.

     

    Kindly like and maek as solution if it works for you.

5 Replies

  • Hi Craig_Harley,

     

    As per the assumption i believe your data is structured like this 

     

    API URI Level 0 Level 1 Level 2 Level 3
    API 1 API 2 API 3 ... ...

     

    But to achieve what you want the data should be structured as

     

    Parent API Child API Level
    API 1 API 2 0
    API 2 API 3 1
    API 3 API 4 2

     

    Try to convert your data to the format which i shared above, if it still doesn't work please share sample data.

     

    ๐ŸŒŸ I hope this solution helps you unlock your Power BI potential! If you found it helpful, click 'Mark as Solution' to guide others toward the answers they need.
    ๐Ÿ’ก Love the effort? Drop the kudos! Your appreciation fuels community spirit and innovation.
    ๐ŸŽ– As a proud SuperUser and Microsoft Partner, weโ€™re here to empower your data journey and the Power BI Community at large.
    ๐Ÿ”— Curious to explore more? [Discover here].
    Letโ€™s keep building smarter solutions together!

    • Craig_Harley's avatar
      Craig_Harley
      Regular Visitor

      Thanks for getting back so quickly,

      just to clarify the data received is a .csv file extract from the API catalogue

      examples of the 2 key fields are shown below (reality is much more complex)

      URIConsumes
      API 1SoR 1
      API 2API 1
      API 3SoR 1,
      API 4API 7
      API 5SoR 1, SoR 3
      API 6SoR 2, API 1, API 2, API 3
      API 7API 11, API 12
      API 8SoR 1, SoR 2, SoR 3, API 9
      API 9API 2, API 3
      API 10SoR 5
      API 11SoR 2
      API 12API 1

      Every API within the Consumes Column, will have an entry in the URI Column

      The URI column is the unique field for the dataset (all the other columns describe specific features about the URI).

      from a hierachy perspective, i have tried with the table above to show the current situation

      For example,

      API 4 consumes API 7 (i.e. URI consumes Level 0)

      API 7 consumes API 11 and API 12 (i.e. Level 0 consumes Level 1)

      API 12 consumes API 1 (i.e. Level 1 consumes Level 2)

      API 1 consumes SoR 1 (i.e. Level 2 consumes Level 3)

      I have modelled as follows, using cut down replicas of the original table

       

      to a degree this works as I am able to correctly navigate through the decomposition tree

      at the Consumer and API URI levels it successfully displays the correct dataset on the Drillthrough page.

      The issue comes when i drillthrough from Level 0/1/2/3, as from each oner of these nodes it drills through to the same entry as API URI, where as i want to be able to drill through to the API entry at Level 0/1/2/3 to its equivalent entry in API URI.

       

      Apologies if my description is a bit convoluted

       

       

      • grazitti_sapna's avatar
        grazitti_sapna
        Super User

        Hi Craig_Harley,

         

        Thank you for the explaination, based on it i've created a sample .pbix file.

         

        I've added another table to map the URI and consumes and then added calculated columns for all levels in the raw table.

         

        this is just an example and you can tweak it as per your requirment to get desired details.

         

        Kindly like and maek as solution if it works for you.

  • v-ssriganesh's avatar
    v-ssriganesh
    Community Support

    Hi Craig_Harley,

    Thank you for posting your query in the Microsoft Fabric Community Forum, and thanks to grazitti_sapna for sharing valuable insights.

     

    Could you please confirm if your query has been resolved by the provided solutions? This would be helpful for other members who may encounter similar issues.

     

    Thank you for being part of the Microsoft Fabric Community.

  • v-ssriganesh's avatar
    v-ssriganesh
    Community Support

    Hello Craig_Harley,

    We hope you're doing well. Could you please confirm whether your issue has been resolved or if you're still facing challenges? Your update will be valuable to the community and may assist others with similar concerns.

    Thank you.