Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
ckchhabra
New Member

Slicer showing duplicates

Hello All,

 

I have a fact table 'Table1' in which I have buyer_name column that has names of buyers (all my tables are in direct query). This table has duplicate values of buyers. So when I use this field in slicer, I see duplicates in it. Then I create a new table using below dax which removes the duplicates-

 

ckchhabra_0-1666968948429.png

 

Table 2 = SUMMARIZE('Table1','Table1'[buyer_name])

 

TABLE 2 is now an import query.

 

Then I create a relationship between them but I am getting many to many relationships which should not be possible as table 2 has distinct values. I dont understand why! Though I can see distinct values in slicer using table 2 buyer name. Should I use it ayways?

 

Method 2 that I tried -

I also tried referencing table 1 to create table 2  (this case table 2 is direct query) and then joined them using one to many relationship (it was showing nw in pbi) but however, when I use the new column buyer_name in slicer, baam..I can STILL SEE DUPLICATES, even though table 2 only has distinct values. I just dont knw what is happening! Is is due to some direct query bug?

Please help

3 REPLIES 3
ckchhabra
New Member

So, I just found that power bi is duplicating one of the buyer names when i create a calculated table table 2 using summarize dax function. I have tried groupby, value, distinct, but still it is duplicatng one of the buyer name. I dont know why. 

but when I create another table Table 3 and use group by with Table 2. Then it gives me the right result.

However, when i export the duplicated Table 2 to excel, i cannot see that duplicate buyer name. It comes only one time.

I dont know whats happening here.

amitchandak
Super User
Super User

@ckchhabra , Please use clean and trim in power query and see if that can solve the issue

 

Power Query Trim and Clean : https://youtu.be/NRYPsCnS0w4

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Hi @amitchandak 

 

I tried trim using dax for calculated table Table 2, but it is still detecting many to many relationship. 

Helpful resources

Announcements
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

Check out the October 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

Find out what's new and trending in the Fabric Community.