Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
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.
User | Count |
---|---|
12 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
24 | |
19 | |
14 | |
10 | |
7 |