Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
I'm looking for some help of how to achieve a count of customers across a month where the sum of a couple of columns is 0. In this dataset below, I want to be able to have a table in that simply counts customers where the sum of the Available AND Used is 0 for the customer in the specific Job_ID (aggregating at the job_id level, not the Offer/status level).
In this example, I'd want for Job_Id of 202309, the count to be 1 (customer 345) and when I change the table filter to 202310, I'd expect the count to go to 2 (customers 123 and 345). Seems so simple, but I'm struggling. Please can someone help?
Job_id | CustomerId | Offer | Status | Available | Used |
202309 | 123 | 1a | Expired | 0 | 0 |
202309 | 123 | 1b | Assigned | 50 | 0 |
202309 | 123 | 1c | Expired | 0 | 0 |
202309 | 234 | 1a | Used | 0 | 50 |
202309 | 234 | 1b | Assigned | 100 | 0 |
202309 | 234 | 1c | Assigned | 100 | 0 |
202309 | 345 | 1a | Expired | 0 | 0 |
202309 | 345 | 1b | Expired | 0 | 0 |
202309 | 345 | 1c | Expired | 0 | 0 |
202310 | 123 | 1a | Expired | 0 | 0 |
202310 | 123 | 1b | Expired | 0 | 0 |
202310 | 123 | 1c | Expired | 0 | 0 |
202310 | 234 | 1a | Used | 0 | 50 |
202310 | 234 | 1b | Assigned | 100 | 0 |
202310 | 234 | 1c | Assigned | 100 | 0 |
202310 | 345 | 1a | Expired | 0 | 0 |
202310 | 345 | 1b | Expired | 0 | 0 |
202310 | 345 | 1c | Expired | 0 | 0 |
Solved! Go to Solution.
Try these measures:
Sum Available = SUM ( Jobs[Available] )
Sum Used = SUM ( Jobs[Used] )
Count of Customers with 0 Available/Used =
VAR vTable =
SUMMARIZE ( Jobs, Jobs[Job_id], Jobs[CustomerId] )
VAR vResult =
SUMX ( vTable, IF ( [Sum Available] = 0 && [Sum Used] = 0, 1 ) )
RETURN
vResult
Proud to be a Super User!
Try these measures:
Sum Available = SUM ( Jobs[Available] )
Sum Used = SUM ( Jobs[Used] )
Count of Customers with 0 Available/Used =
VAR vTable =
SUMMARIZE ( Jobs, Jobs[Job_id], Jobs[CustomerId] )
VAR vResult =
SUMX ( vTable, IF ( [Sum Available] = 0 && [Sum Used] = 0, 1 ) )
RETURN
vResult
Proud to be a Super User!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
143 | |
85 | |
66 | |
51 | |
45 |
User | Count |
---|---|
216 | |
89 | |
82 | |
66 | |
57 |