Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers!
Enter the sweepstakes now!Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.
Hi all, I am trying to count the number of customer names who used both email AND mobile based on these two tables. Given the example data, I want to be able to show in a report that the number of customer names who used both email AND mobile was 1 (only customer A). Customer B did not use both. How would I do this?
I also would like to calculate the average number of Channels used (channel total > 0) for a Customer. Any ideas?
Customer Table
Customer | Product ID |
A | A1 |
A | A2 |
B | B1 |
B | B2 |
Feature Usage
Product ID | Channel | Channel Total |
A1 | 10 | |
A2 | Mobile | 20 |
B1 | 50 | |
B2 | Mobile | 0 |
Sample output: 2 KPI cards
KPI Card 1: # of Customers who only used Email Channel (i.e. Customer B)
1
KPI Card 2 : # of Customers who used both Email and Mobile (i.e. Customer A)
1
@Anonymous , I doubt the data model is correct. You should have a customer table, product table, and customer product and feature tables.
If these two tables are joined on the product , this one should able to give you an answer
sumx(summarize(Feature,Customer [Customer],Customer[Product ID],Feature[Channel], "_1", max(Feature[Channel Total])),[_1])
Hi @Anonymous
As @parry2k mentioned, your current data is based on relationship of table, and when the relationship are many to many or many to one, the result will be different. So if possible, could you please inform me more sample. You could refer to my sample for details.
Best Regards,
Zoe Zhi
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@dax I have a many to many relationship between the two tables, which are related by Product ID. How can I modify the measures to account for this?
Hi @Anonymous ,
If possible, could you please inform me more detailed information(such as your expected output and your sample data (by OneDrive for Business))? Then I will help you more correctly.
Please do mask sensitive data before uploading.
Thanks for your understanding and support.
Best Regards,
Zoe Zhi
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @dax , I have updated my post. It contains both the same data (2 tables), and expected output (2 KPI cards). Please let me know if you can assist. Thanks
@Anonymous how come the customer table has duplicate customer records? How your data model looks like? The solution will heavily depend on the data model and the relationship between the tables
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
@parry2k @amitchandak @dax there is a many to many relationship between two tables, and they are related by Product ID. I know it isn't an ideal data model, but it is what I have available to me.
Check out the April 2025 Power BI update to learn about new features.
Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
User | Count |
---|---|
72 | |
71 | |
68 | |
42 | |
42 |
User | Count |
---|---|
46 | |
40 | |
28 | |
27 | |
26 |