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.
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!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
108 | |
100 | |
78 | |
64 | |
58 |
User | Count |
---|---|
148 | |
111 | |
94 | |
84 | |
67 |