Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
I have two fact tables that are related to a dimension table, like so:
'Campaign Clicks' *<--1 'Customers' 1 --> * 'Inbound Calls'
I need to build a measure showing the average number of inbound calls per customer (total calls/total customers) for the customers who called in within 7 days of clicking on the campaign.
I cannot change the direction of the relationships or create bridging tables, so everything will have to be coded in measure. I tried using TREATAS, but it does not give me the results I need. Propagating filters using TREATAS in DAX - SQLBI
Any tips?
Can you provide some dummy data about the three tables as well as the expected result? You want to count the customers who called in within 7 days of clicking on the campaign, do they only click on the campaign once? How many campaigns are included in 'Campaign Clicks' table? Sample data will help us understand more about what you want.
Best Regards,
Community Support Team _ Jing
Hi @v-jingzhang thanks for picking this up.
Below is the screenshot of the model part in question, the three tables are linked on Customer ID, but there is no relationship between the two fact tables.
One customer can click on an unlimited number of campaigns, but for simplicity sake, I'm working with just the latest episode of clicks/calls, so something like MAXX will do.
It's still not very clear. Can I consider that in 'Campaign Clicks' table, we need to get the latest time of a click for each customer. If a customer made a call/calls after that time, we need to extract the earliest call time and calculate whether the duration between "latest click time" and "earliest call time" is less than 7 days? If it is less than 7 days, then we count this customer and count how many calls he made from 'Inbound Calls' table?
If my above understanding is correct, is it possible that a customer would click campaigns again after he had made a call? If so, only getting the latest click time is not appropriate as it would miss calls happened earlier than that.
Can you provide some sample data to help me understand the problem better?
Best Regards,
Jing
Hi @v-jingzhang below is the data samples from the campaign and call tables, I hope it makes sense.
The business problem I'm trying to solve is a reduction of incoming calls. If a customer sees an online campaign they should ideally resolve their issue online instead of calling in. But some campaigns drive up call traffic instead.
So the questions I'm trying to answer are these:
I hope it makes sense, thank you for your help.
CAMPAIGN CLICKS
Customer ID | Campaign ID | Date | Campaign Clicks |
12345 | ABCDE | 2021-12-01 | 0 |
16582 | ABCDE | 2021-12-01 | 2 |
12345 | AEEEE | 2021-12-02 | 1 |
12345 | ABCDE | 2021-12-03 | 5 |
17777 | EEFFF | 2021-12-04 | 8 |
INCOMING CALLS
Customer ID | Date | Call Topic | Resolved |
12345 | 2021-12-07 | Support | TRUE |
99598 | 2021-12-07 | Complaint | TRUE |
12345 | 2021-12-08 | Sales | TRUE |
@MightyMicrobe , Try a measure like
Measure =
var _min = calculate(Min('Campaign Clicks'[Start DAte]), allexcept(Customers[Customers]))
return
calculate(sumx(values(Customers[Customers]) , count('Inbound Calls'[Call ID]), Filter('Inbound Calls', 'Inbound Calls'[Date] >= _min && 'Inbound Calls'[Date] <=_max)))
Sorry, this does not work. The last FILTER in the RESULT clause trips it up.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
56 | |
55 | |
54 | |
37 | |
29 |
User | Count |
---|---|
77 | |
62 | |
45 | |
40 | |
40 |