The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
I have a set of data for customer appointments
Table 1 is the customer fact table (name, id, etc.)
Table 2 is the appointment data (id, appointment date, appointment status)
I have a measure that calculates the next future appointment
Measure =
Solved! Go to Solution.
I'm going to assume that the id column links the two tables, but go ahead and substitute whatever you need.
Customers with no Next Appointment =
var AllCustomers = VALUES(Table1[CustomerID])
var customersWithAppointment = SELECTCOLUMNS(FILTER(Table2, Table2[Appointment Date] >= TODAY()),
"customers", Table2[id])
RETURN COUNTROWS(EXCEPT(AllCustomers, customersWithAppointment))
I'm going to assume that the id column links the two tables, but go ahead and substitute whatever you need.
Customers with no Next Appointment =
var AllCustomers = VALUES(Table1[CustomerID])
var customersWithAppointment = SELECTCOLUMNS(FILTER(Table2, Table2[Appointment Date] >= TODAY()),
"customers", Table2[id])
RETURN COUNTROWS(EXCEPT(AllCustomers, customersWithAppointment))
User | Count |
---|---|
26 | |
10 | |
8 | |
6 | |
6 |
User | Count |
---|---|
31 | |
11 | |
10 | |
10 | |
9 |