Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin 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.
I have 2 tables:
"planned visits" and "visited"
PLANNED VISITS:
ID | Quarter | SALES REP |
1 | Q1 | John |
2 | Q1 | John |
3 | Q1 | John |
1 | Q2 | John |
4 | Q1 | Rob |
6 | Q1 | Rob |
VISITED:
ID | Quarter | SALES REP |
1 | Q1 | John |
2 | Q1 | John |
4 | Q1 | Rob |
I have 2 measures that count how many clients each sales rep has per quarter:
ID | Quarter | SALES REP |
1 | Q1 | John |
2 | Q1 | John |
4 | Q1 | Rob |
99999 | Q1 | John |
Solved! Go to Solution.
Hi @df123445 ,
Looking at the documentation of the CALCULATE function, you can see that you can add multiple filters (your GROUPBY is the first and only filter you apply).
CALCULATE(<expression>[, <filter1> [, <filter2> [, …]]])
This means, you can simply add a comma and add another filter to only look at ID's available in your other table. Something like:
CALCULATE(
DISTINCTCOUNT('VISITED'[ID]),
GROUPBY('VISITED', 'VISITED'[Quarter], 'VISITED'[SALES REP] ),
'VISITED'[ID] IN VALUES('PLANNED'[ID])
)
now you added anothter filter.
Hi @df123445 ,
Looking at the documentation of the CALCULATE function, you can see that you can add multiple filters (your GROUPBY is the first and only filter you apply).
CALCULATE(<expression>[, <filter1> [, <filter2> [, …]]])
This means, you can simply add a comma and add another filter to only look at ID's available in your other table. Something like:
CALCULATE(
DISTINCTCOUNT('VISITED'[ID]),
GROUPBY('VISITED', 'VISITED'[Quarter], 'VISITED'[SALES REP] ),
'VISITED'[ID] IN VALUES('PLANNED'[ID])
)
now you added anothter filter.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
74 | |
73 | |
56 | |
38 | |
31 |
User | Count |
---|---|
83 | |
64 | |
63 | |
49 | |
45 |