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 dateJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
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.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
16 | |
9 | |
7 | |
7 | |
6 |
User | Count |
---|---|
23 | |
11 | |
10 | |
10 | |
8 |