The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
consider 2 tables orders and sales having conection with each other and below are the table details
consider table 1 : orders
below are fields of orders table
which contains
id
name
order date
consider table 2 : sales
below are fields of sales table:
idsales
quantity
ship date
now find the distinct count of "id" in the orders table that is not present in the sales table using dax
note:
is the below formula correct
@MattAllington @xifeng_L @lbendlin
Solved! Go to Solution.
I would try something like the below:
distinct count not in table = COUNTROWS(EXCEPT(VALUES(orders[id]), VALUES(sales[id])))
That's fine, but I think it might be better to change VALUES to ALL, so as to avoid the effects of some extraneous filtering.
distinct count not in table = COUNTROWS(EXCEPT(ALL(orders[id]), ALL(sales[id])))
The type of relationship between the table matters. What is the cardinality and direction of filter propagation? A screen should of the model view is normally easiest
I would try something like the below:
distinct count not in table = COUNTROWS(EXCEPT(VALUES(orders[id]), VALUES(sales[id])))
That's fine, but I think it might be better to change VALUES to ALL, so as to avoid the effects of some extraneous filtering.
distinct count not in table = COUNTROWS(EXCEPT(ALL(orders[id]), ALL(sales[id])))
User | Count |
---|---|
15 | |
13 | |
8 | |
6 | |
5 |
User | Count |
---|---|
24 | |
19 | |
12 | |
9 | |
7 |