Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago

PowerBI display value based on value in another column

Hi all,

 

i am relatively new to PowerBI and i dont know if its possible to achieve - maybe you guys can help me out! (i hope so 🙂 )

 

I imported a CSV File (data comes from an API Script) and transformed it by examples (to get the right values to the correct headers).

So far so good.

This is how it looks like:

 

Every Group is in a Parent group - indicated by the "parentGroupUuidGroup" Column/Value.

What i want to achieve is that i get a new column with the assigned parent group name (i try to "link" them).

The data of the parent Groups are also in the above Columns.

 

Is there a possible way to do this on this data basis?

 

Any help would be much appreciated!

Many thanks!

 

Regards

Gerald

10 Replies

  • How many rows? If not too many then you can join the table with itself in PowerQuery to look that up.  If a lot then yu need to look at DAX options like LOOKUPVALUE or TREATAS.

  • Anonymous's avatar
    Anonymous
    Not applicable

    I have about 450 rows. 
    Can you give me a hint how to actually achieve this in PowerQuery?

    These are my first steps with PowerQuery 🙂

    • lbendlin's avatar
      lbendlin
      Super User

      Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).

      Do not include sensitive information or anything not related to the issue or question.

      If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216

      Please show the expected outcome based on the sample data you provided.

      Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

      • Anonymous's avatar
        Anonymous
        Not applicable

        Here are some example Data:

         

        displayNameuuidparentGroupUuid
        All00000000-0000-0000-7001-000000000001nil
        Lost & found00000000-0000-0000-7001-00000000000200000000-0000-0000-7001-000000000001
        Windows computers00000000-0000-0000-7015-0000000000018043ada4-fed2-428f-9b40-c4c5f0f587b1
        ZZZ_Standard dynamische Gruppen8043ada4-fed2-428f-9b40-c4c5f0f587b100000000-0000-0000-7001-000000000001
        Linux computers00000000-0000-0000-7015-0000000000028043ada4-fed2-428f-9b40-c4c5f0f587b1

         

         

        Here is how it should look like:

        displayNameuuidparentGroupUuidparentGroupDisplayName
        All00000000-0000-0000-7001-000000000001nil- ("All" is the top group)
        Lost & found00000000-0000-0000-7001-00000000000200000000-0000-0000-7001-000000000001All
        Windows computers00000000-0000-0000-7015-0000000000018043ada4-fed2-428f-9b40-c4c5f0f587b1ZZZ_Standard dynamische Gruppen
        ZZZ_Standard dynamische Gruppen8043ada4-fed2-428f-9b40-c4c5f0f587b100000000-0000-0000-7001-000000000001All
        Linux computers00000000-0000-0000-7015-0000000000028043ada4-fed2-428f-9b40-c4c5f0f587b1ZZZ_Standard dynamische Gruppen

         

        I have a total of up to 4 levels of these groups.

        It looks like this (everyone of these levels is a group):

        All

        - Customer 1

        -- Group 1

        --- possible Subgroup

        -- Group 2

        -- Group 3

        --- possible Subgroup

        - Customer 2

         

        It should always output the "Customer" group in the "parentGroupDisplayName" Column.

         

        Many thanks in advance!

         

        Regards

        Gerald