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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Paulien1989
Advocate II
Advocate II

Trouble creating lookup table with unique URLs

Hi everyone,

 

I am still trying to create a table with a column that only lists the unique URLs from Google Analytics data. I need it as like the heart of the data model I want to set up. I filtered out everything before September last year (lot of junk), clicked Remove Duplicates and Remove Blanks a hundred times, tried pivoting and unpivoting, column and table formulas from both the forum and documentation - nothing works. When I command Keep Duplicates in the Query Editor the table turns up empty, but in the Data view I am still counting 3563 rows and 3513 distinct values. Cat Sad 

 

It shouldn't be this difficult to keep only the unique values in a column, right?

 

Even though the data type is text, in theory every URL should be unique. Or maybe there are like Page IDs in Google Analytics data I don't know about?

 

I really hope someone, anyone, can provide me with a solution a.s.a.p., because I really need to get this done. Thanks!

5 REPLIES 5
ImkeF
Super User
Super User

Use Text.Clean and Text.Trim: Check column -> Transform -> Text Column -> Format: there you see the options, one after each other

This will get rid of blanks and unprintable character as stuff like that.

 

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

Lol, now I have the same number of rows but with 3514 distinct values...

Hm - so that only eliminated only 1 uncatched dup.

Somewhere I've read that the counts shown for the tables are not reliable.

Check the following: Duplicate your query and try to connect both (same) queries on 1:1. If it works: Pls make bug-report here: https://community.powerbi.com/t5/Issues/idb-p/Issues - Thx

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

Holy jokes, I did it. There was a metric in the table that, for a reason God knows, didn't correspond well with the dimensions and ended up with duplicates. Removing that metric removed all duplicates. Pfew.... Thanks guys for thinking along at least!

Greg_Deckler
Super User
Super User

Perhaps try some trim operations on the column before you do the remove duplicates? Any way you can post a link to the data or PBIX. I'd be interested in seeing why remove duplicates is not apparently removing all of the duplicates.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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