March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
I have a table with 3 rows (MobilePhone, LeadSource,CreatedDate). I am trying to create a New column which basically displays the LeadSource if exist with the same phone number in the last 30 days else use the current Lead source. Any help how do i go ahead with this? Thanks!
Solved! Go to Solution.
try a column
Column =
var _findVal = CALCULATE(FIRSTNONBLANK(Table[LeadSource]), FILTER(ALL(Table), Table[MobilePhone]=EARLIER(Table[MobilePhone]) && DATEDIFF(Table[CreatedDate], Today(), DAY) <=30) )
RETURN
if(isblank(_findVal ), Table[LeadSource], _findVal )
try
Prev Lead Source =
var _findVal = CALCULATE(FIRSTNONBLANK('Lead'[LeadSource],1), FILTER(ALL('Lead'), 'Lead'[MobilePhone]=EARLIER('Lead'[MobilePhone]) && DATEDIFF('Lead'[CreatedDate], EARLIER('Lead'[CreatedDate]), DAY) <=30) )
RETURN
if(isblank(_findVal ), 'Lead'[LeadSource], _findVal)
try a column
Column =
var _findVal = CALCULATE(FIRSTNONBLANK(Table[LeadSource]), FILTER(ALL(Table), Table[MobilePhone]=EARLIER(Table[MobilePhone]) && DATEDIFF(Table[CreatedDate], Today(), DAY) <=30) )
RETURN
if(isblank(_findVal ), Table[LeadSource], _findVal )
How do i ammend it if i want the Leadsource for last 30 days from the CreatedDate?
try
Prev Lead Source =
var _findVal = CALCULATE(FIRSTNONBLANK('Lead'[LeadSource],1), FILTER(ALL('Lead'), 'Lead'[MobilePhone]=EARLIER('Lead'[MobilePhone]) && DATEDIFF('Lead'[CreatedDate], EARLIER('Lead'[CreatedDate]), DAY) <=30) )
RETURN
if(isblank(_findVal ), 'Lead'[LeadSource], _findVal)
That actually worked! Thanks!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
124 | |
89 | |
84 | |
70 | |
51 |
User | Count |
---|---|
206 | |
143 | |
97 | |
79 | |
68 |