Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hi,
I'm trying to create a calculated column from a second table based on a date value. The goal is to display the actual level for each account before a campaign has been send.
Levels
| AccountID | PrevFunnelLvl | NewFunnelLvl | ChangeDate |
| 101 | - | L1 | 02.01.2022 |
| 101 | L1 | L2 | 06.01.2022 |
| 101 | L2 | L3 | 10.01.2022 |
| 202 | L2 | L3 | 08.01.2022 |
| 202 | L4 | L5 | 12.01.2022 |
Campaign
| AccountID | CampaignDate | LvlonCampaignDate |
| 101 | 05.01.2022 | L1 |
| 101 | 11.01.2022 | L3 |
| 202 | 10.01.2022 | L3 |
Thanks in advance!
Hi,
I assume your two tables do not have a Many-to-Many relationship on the AccountID column?
Level on Campaign Date =
VAR AccountID = Campaign[AccountID]
VAR CampaignDate = Campaign[CampaignDate]
RETURN
CALCULATE(
MAX( 'Levels'[NewFunnelLevel] ),
FILTER(
'Levels',
'Levels'[AccountID] = AccountID
&& 'Levels'[ChangeDate] <= CampaignDate
)
)Regards
They do have an inactive many-to-many relationship but also connected via Account table. Sadly I didn't got %100 correct values on all rows.
Perhaps post a new small example dataset and highlight the results from my formula which aren't correct.
Regards
Hi @MarcelLandsky ,
Sorry for that the information you have provided is not making the problem clear to me. Could you please share more details to help us clarify your scenario?
Please provide us with more details about your table and your problem or share me with your pbix file after removing sensitive data.
Refer to:
How to provide sample data in the Power BI Forum
How to Get Your Question Answered Quickly
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Check out the November 2025 Fabric update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!