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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
vanik85
Helper I
Helper I

how do I Identify Duplicates in last 90 days and publish first touch attribution fields

I have a table with below fileds

 

MonthMobileUTM
10-Apr11111Organic
12-Apr11111Paid
15-Apr22222Paid
20-Apr33333Paid
02-May55555Paid
12-May33333Organic
12-May22222Organic
12-Jun11111Web
12-Jun44444Paid
28-Jul22222Paid

 

I wish to check duplicates in mobile numbers by checking past 90 days and accordinlgy revert with Unique or Repeat user. Additonally need to mention first touch points

 

 

 

MonthMobileUTMUnique/RepeatFirst Touch MonthFirst Touch UTM
10-Apr11111OrganicRepeatAprOrganic
12-Apr11111PaidRepeatAprOrganic
15-Apr22222PaidRepeatAprPaid
20-Apr33333PaidRepeatAprPaid
02-May55555PaidUniqueMayPaid
12-May33333OrganicRepeatAprPaid
12-May22222OrganicRepeatAprPaid
12-Jun11111WebRepeatAprOrganic
12-Jun44444PaidUniqueJunePaid
28-Jul22222PaidUniqueJulyPaid

 

 

Can above be done using custom table using certain commands ?

1 ACCEPTED SOLUTION

Hi,

These calculated column formulas work

Unique/Repeat = if(Data[Month]-CALCULATE(MAX(Data[Month]),FILTER(Data,Data[Mobile]=EARLIER(Data[Mobile])&&Data[Month]<EARLIER(Data[Month])))<=90,"Repeat","Unique")
First touch month = FORMAT(CALCULATE(min(Data[Month]),FILTER(Data,Data[Mobile]=EARLIER(Data[Mobile])&&Data[Month]<=EARLIER(Data[Month]))),"mmmm")
First touch UTM = LOOKUPVALUE(Data[UTM],Data[Month],CALCULATE(min(Data[Month]),FILTER(Data,Data[Mobile]=EARLIER(Data[Mobile])&&Data[Month]<=EARLIER(Data[Month]))),Data[Mobile],Data[Mobile])

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

11 REPLIES 11
Ashish_Mathur
Super User
Super User

Hi,

On what basis have you got the Repeat and unique in the column?  Why should 11111 pn April 12 be repeat? - there is no data for this ID in the past 90 days.

Also, do you want a measure or a calculated column formula solution?


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Why should 11111 pn April 12 be repeat? - there is no data for this ID in the past 90 days.

 

there is a data entry for mobile 1111 on 10th Apr hence..

Sorry but i meant to ask why on April 10 should the word repeat appear for 11111.  For this ID, there is no data prior to April 10.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

It's fine incase no prior value it will be unique

Hi,

These calculated column formulas work

Unique/Repeat = if(Data[Month]-CALCULATE(MAX(Data[Month]),FILTER(Data,Data[Mobile]=EARLIER(Data[Mobile])&&Data[Month]<EARLIER(Data[Month])))<=90,"Repeat","Unique")
First touch month = FORMAT(CALCULATE(min(Data[Month]),FILTER(Data,Data[Mobile]=EARLIER(Data[Mobile])&&Data[Month]<=EARLIER(Data[Month]))),"mmmm")
First touch UTM = LOOKUPVALUE(Data[UTM],Data[Month],CALCULATE(min(Data[Month]),FILTER(Data,Data[Mobile]=EARLIER(Data[Mobile])&&Data[Month]<=EARLIER(Data[Month]))),Data[Mobile],Data[Mobile])

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hi 

 

getting error a table of multiple values was supplied where a single value was expected on first touch UTM query

 

IMG_9099.jpeg

It means that for one or more mobile numbers, there are multiple min dates.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

That would a scenario when a Mobile number was punched within hours on same day correct ?

do o need to alter the formulae then ?

First and foremost, post a representative sample and clearly show such nuances.  On that representative sample, show the expected result.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Thanks a lot !

You are welcome.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.