Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi, I wish to wrrite a DAX to apply a FILTER for a table column to a DISTINCTCOUNT of another table.
Essentially, using a table, I wish to count the number of suppliers supplying to three indfividual shops.
DISTINCTCOUNT (Table 1 [Suppliers], FILTER (Table 2 [Shop 1]))
Any help wold be appreciated. Thanks.
Solved! Go to Solution.
Hi, @1001
I've simulated some data that I hope fits your situation.
Sample data:
Measure =
CALCULATE (
DISTINCTCOUNT ( 'Table 1'[Suppliers] ),
FILTER ( ALL ( 'Table 2' ), [Shop] = "Shop 1" )
)
Is this the result you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @1001
I've simulated some data that I hope fits your situation.
Sample data:
Measure =
CALCULATE (
DISTINCTCOUNT ( 'Table 1'[Suppliers] ),
FILTER ( ALL ( 'Table 2' ), [Shop] = "Shop 1" )
)
Is this the result you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
how are these tables linked? can you provide some sample data from the tables in text form with a screenshot of what your data looks like?
Proud to be a Super User!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
101 | |
86 | |
64 |