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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi Community -
I am trying to write DAX that will return the name of a marketing campaign, where the date the person responded to the campaign is less than or equal to the date the opportunity was created. The data is on seperate tables.
For my model I have three tables. A 'Campaign Member' table that holds the marketing response data, a person table (w/ person ID), and a opportunity table.
Here is what I have tried, however it is not pulling as expected. Looking for some help.
Hi @vehloaaron ,
Please try the following expression and if you still have problems, I think you can use the EARLIER function for grouping:
Opportunity Create Campaign =
CALCULATE(
LASTNONBLANK('Campaign Member'[Campaign Name], TRUE()),
FILTER(
ALL('Campaign Member'),
'Campaign Member'[Person ID] = Opportunities[Person ID] &&
'Campaign Member'[Responded] = TRUE() &&
Opportunities[Opportunity Created Date] <= 'Campaign Member'[Campaign Member Association Date]
)
)
Hope it helps!
Best regards,
Community Support Team_ Scott Chang
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
This is still returning the incorrect value, I tried grouping by earlier but that also didn't work.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 39 | |
| 37 | |
| 33 | |
| 32 | |
| 29 |
| User | Count |
|---|---|
| 133 | |
| 88 | |
| 85 | |
| 68 | |
| 64 |