Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi,
I'm trying to create a measure to get the num/percentage of customer using my mobile app. This can be determined by 2 tables but I haven't been able to get it to work. My latest attempt is included below.
My main table is called Customers. The PK is Customer_ID.
The second table is called Interwebs. Here is the structure:
Customer_ID
WWW_Mobile
There can be numerous records for each customer in the second table but I only care if there is 1 record where WWW_Mobile is greater than 0. That is the number of mobile logins. If a customer has at least 1 record like this, they need to be counted. My goal was to take this number, subtract it from the number of distinct Customer_ID in the first table and that gets me the number/percentage of customer that are using my mobile app. Below is the measure. What am I doing wrong?
NumCustomersUsingMobile =
CALCULATE
(
DISTINCTCOUNT(Customers[Customer_ID])
)-
(
DISTINCTCOUNT(Interwebs[Customer_ID]), FILTER(Interwebs[WWW_Mobile] > 0)
)
Thanks!
Hey @Anonymous ,
from the description, and the DAX you provided I assume that the result returns the number of customers who are NOT using your mobile app, but maybe I'm wrong.
Can you please describe what the measure returns and why it does not match with your expectations.
Maybe you want to consider, to create a pbix file that contains some sample data, but still reflects your data model, upload the file to onedrive or dropbox and share the link.
Regards,
Tom
Hi,
I need both and can accept 1 measure and tweak it to make the other.
My file is below. It has 6 total customers in both tables. Customer_ID 2, 3, 5 and 6 are in the Interwebs table and have a value greater than 0 for the column called WWW_Mobile in the Interwebs file. These need to be counted as users that logged in to my mobile app.
User | Count |
---|---|
141 | |
113 | |
104 | |
77 | |
64 |
User | Count |
---|---|
136 | |
125 | |
107 | |
70 | |
61 |