Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi Guys,
Hope you can help with some Dax fun.
I need a measure to calculate how many unique customers that have bougt only through agencies in 2021.
The output that I seek is from this Data is = 3.
(Only customer D,E & F have bought through Agency only in 2021)
I have tried this, but it dosn't give me the result I want.
My Data looks like:
Year | Month | Customer | Revenue | Channel |
2021 | Jan | A | 100 | Agency |
2021 | Jan | B | 150 | Agency |
2021 | Jan | C | 100 | Agency |
2021 | Jan | D | 120 | Agency |
2021 | Jan | E | 80 | Agency |
2021 | Jan | F | 90 | Agency |
2021 | Jan | F | 20 | Agency |
2021 | Feb | A | 120 | Direct |
2021 | Feb | B | 90 | Direct |
2021 | Feb | C | 100 | Direct |
Solved! Go to Solution.
@Anonymous Perhaps:
Measure =
VAR __Direct = SUMMARIZE(FILTER('Table',[Year]=2021 && [Channel]="Direct"),[Customer])
VAR __Agency = SUMMARIZE(FILTER('Table',[Year]=2021 && [Channel]="Agency"),[Customer])
RETURN
COUNTROWS(
EXCEPT(
__Agency,
__Direct
)
)
Works like a charm - thanks!
@Anonymous Perhaps:
Measure =
VAR __Direct = SUMMARIZE(FILTER('Table',[Year]=2021 && [Channel]="Direct"),[Customer])
VAR __Agency = SUMMARIZE(FILTER('Table',[Year]=2021 && [Channel]="Agency"),[Customer])
RETURN
COUNTROWS(
EXCEPT(
__Agency,
__Direct
)
)
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
23 | |
8 | |
7 | |
6 | |
6 |
User | Count |
---|---|
28 | |
12 | |
10 | |
10 | |
6 |