Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request 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.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!