Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowJuly 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more
Hi
We have two sets of data, with very few relationships; product and date
One set of contains TV Advertising data; this data contains the Advert airtime along with the channel, programme, creative etc.
The other Leads and Sales data; when these leads come and and if we converted to a sale.
We want to see if a lead was generated from the time the advert was aired up to 15-minutes after air time. We can then attribute that lead to that advert.
I've managed to figure a way to do this by adding a calculated column to the Advertising Data with the below code.
Solved! Go to Solution.
@Stones , You can have new column in sales too
new column in sales =
var_1 = Countx(filter(Advertising Data, Advertising Data[Date] = Leads & Sales Data[Lead Date]
&& Leads & Sales Data[Lead Time In] >= Advertising Data[Date Time Aired]
&& Leads & Sales Data[Lead Time In] <= Advertising Data[Date Time Aired + 15-Min]), Advertising Data[Date])
return
if(isblank(_1),0,1)
or you can populate lead id using maxx/minx
@Stones , You can have new column in sales too
new column in sales =
var_1 = Countx(filter(Advertising Data, Advertising Data[Date] = Leads & Sales Data[Lead Date]
&& Leads & Sales Data[Lead Time In] >= Advertising Data[Date Time Aired]
&& Leads & Sales Data[Lead Time In] <= Advertising Data[Date Time Aired + 15-Min]), Advertising Data[Date])
return
if(isblank(_1),0,1)
or you can populate lead id using maxx/minx
Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.
If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!
Check out the July 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 30 | |
| 26 | |
| 23 | |
| 23 | |
| 14 |
| User | Count |
|---|---|
| 46 | |
| 33 | |
| 20 | |
| 18 | |
| 16 |