Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hi, I'm trying to build some marketing reports that show the initial type of campaign that each person responded to.
I've extracted some data which is related as follows:
For each row in the Person table, I would like to get the Campaign[Type] that is related to the CampaignMember with the earliest (lowest) FirstRespondedDate.
So if a Lead has 5 Campaign Members, get the Campaign Member row with the earliest (lowest) FirstRespondedDate, and return the Campaign[Type] that is related to that Campaign Member.
The first step I took was to add a custom column to Campaign Member to get the Type from the related Campaign.
CampaignType = RELATED(Campaign[Type])
On the Person table, I tried a custom column with this formula:
First Lead Source = LOOKUPVALUE(
'Campaign Member'[CampaignType],
'Campaign Member'[FirstRespondedDate],
MIN('Campaign Member'[FirstRespondedDate])
)But I got the error "A table of multiple values was supplied where a single value was expected"
I've tried a few variations on this formula, but I'm stuck. Any help or guidance is greatly appreciated!
Solved! Go to Solution.
You may refer to the following DAX that adds a calculated column.
Column =
CALCULATE (
SELECTEDVALUE ( 'Campaign Member'[CampaignType] ),
TOPN (
1,
RELATEDTABLE ( 'Campaign Member' ),
'Campaign Member'[FirstRespondedDate], ASC
)
)
You may refer to the following DAX that adds a calculated column.
Column =
CALCULATE (
SELECTEDVALUE ( 'Campaign Member'[CampaignType] ),
TOPN (
1,
RELATEDTABLE ( 'Campaign Member' ),
'Campaign Member'[FirstRespondedDate], ASC
)
)
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 46 | |
| 43 | |
| 39 | |
| 19 | |
| 15 |
| User | Count |
|---|---|
| 68 | |
| 68 | |
| 31 | |
| 27 | |
| 24 |