Forum Discussion
How do I get a unique list ?
- 10 months ago
Hi EaglesTony ,
In Power Query you would use the Table.Distinct() function.
Your two new tables (if you want them to be new tables) would be created as follows:
-1- Reference your main table into two new queries
-2- Remove the column that won't be used in each.
-3- Press Ctrl+A to select the whole table (or Ctrl+Click both columns you want to have unique combinations of).
-4- Go to the Home tab > Remove Rows > Remove Duplicates.
This should create a new code line something like this:
= Table.Distinct(Source, {"IDENTITY", "RoleName"})Pete
- 9 months ago
Hi EaglesTony ,
Please follow these steps to get the result:
1. In Home Tab, go to transform data, It will open power query editor for you.(Home β Transform Data β Power Query Editor.)
2. Right Click your main table and duplicate it and rename it 'Distinct Rolnames'
3.Select two columns that are needed holding CTRL and select Identity and Rolename and right click and select remove other columns.
4.Again select both the columns holding CTRL and select Identity and Rolename and right click and select remove duplicates or (Home β Remove Rows β Remove Duplicates.)
Now you can see the desired output.5. Click Close and Apply.
6.Similar steps please follow for the 2nd output.
7. If you see summarization sign in front of identity in Fields section then change it to "Do Not Summarize". It will wont add up the identity column and will give you desired output.π 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!
Hi EaglesTony ,
Please follow these steps to get the result:
1. In Home Tab, go to transform data, It will open power query editor for you.(Home β Transform Data β Power Query Editor.)
2. Right Click your main table and duplicate it and rename it 'Distinct Rolnames'
3.Select two columns that are needed holding CTRL and select Identity and Rolename and right click and select remove other columns.
4.Again select both the columns holding CTRL and select Identity and Rolename and right click and select remove duplicates or (Home β Remove Rows β Remove Duplicates.)
Now you can see the desired output.
5. Click Close and Apply.
6.Similar steps please follow for the 2nd output.
7. If you see summarization sign in front of identity in Fields section then change it to "Do Not Summarize". It will wont add up the identity column and will give you desired output.
π 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!
Hi grazitti_sapna ,
Can you give me a bit of detail around why your solution works better than the one I provided 10 hours prior please?
Is it faster/more efficient/using different functions that are more user-intuitive?
The only key difference I can see is that you suggest to Duplicate rather than Reference the original query which, in my opinion, is a backwards step in terms of future manageability of the the overall query structure.
Thanks,
Pete