Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
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 @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.
Perhaps post a new small example dataset and highlight the results from my formula which aren't correct.
Regards
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.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 5 | |
| 5 | |
| 4 |
| User | Count |
|---|---|
| 25 | |
| 16 | |
| 8 | |
| 7 | |
| 7 |