Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I need to create a chart that shows by month, how many first time registrants there are vs how many repeat registrants, relative to that point in time. I am stuck on how to manipulate the data to accomplish this.
Here's the current data I have. I'm stumped on how to manipulate this.
Contact ID | Campaign ID | Campaign Date |
Joe | Webinar A | January 2020 |
Joe | Webinar B | June 2020 |
Sally | Webinar B | June 2020 |
Joe | Webinar C | November 2020 |
Sally | Webinar C | November 2020 |
Example: Joe registers for webinar A in January, webinar B in June, webinar C in November. In January, he was a first-time registrant. In June, he is a repeat registrant.
Based on this data table, I want a chart that shows:
Solved! Go to Solution.
@kault .
You can use this code to create a new calculated column:
FirstDate = IF('Table'[Campaign Date] = CALCULATE(MIN('Table'[Campaign Date]), ALLEXCEPT('Table', 'Table'[Contact ID])), "First-Time", "Repeat")
Hi,
You may download my PBI file from here.
Hope this helps.
Here are two measure expressions to use in a table visual with the Campaign Date column.
Repeat =
VAR maxdate =
MAX ( Events[Campaign Date] )
RETURN
COUNTROWS (
FILTER (
DISTINCT ( Events[Contact ID] ),
NOT (
ISBLANK (
CALCULATE (
COUNT ( Events[Campaign ID] ),
ALL ( Events[Campaign Date] ),
Events[Campaign Date] < maxdate
)
)
)
)
) + 0
First Timers =
VAR maxdate =
MAX ( Events[Campaign Date] )
RETURN
COUNTROWS (
FILTER (
DISTINCT ( Events[Contact ID] ),
ISBLANK (
CALCULATE (
COUNT ( Events[Campaign ID] ),
ALL ( Events[Campaign Date] ),
Events[Campaign Date] < maxdate
)
)
)
) + 0
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
@kault .
You can use this code to create a new calculated column:
FirstDate = IF('Table'[Campaign Date] = CALCULATE(MIN('Table'[Campaign Date]), ALLEXCEPT('Table', 'Table'[Contact ID])), "First-Time", "Repeat")
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
97 | |
80 | |
69 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |