Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
Hello,
I have a table with Center #, Customer #, Year, Week #. I am looking to create a measure that will count distinct customer numbers based on a slicer from another table which is filtered to a specific range of weeks.
For example, when weeks 1-4 are selected, the measure should calculate the distinct customers within that week range. Caveat, customer numbers may appear multiple times either within the same week or across weeks.
@Anonymous - was able to help a member in another post, but I believe this is somewhat different. Any help would be appreciated!
Solved! Go to Solution.
Hi @unknown917 ,
Based on your description, I've created some dummy data as well as metrics, check them out
If there's no relationship between tables. You can create the measure as
count distinct customer numbers = CALCULATE(DISTINCTCOUNT('Table'[Customer]),FILTER('Table',[Week] in ALLSELECTED('Table (2)'[Week])&&[Year] in ALLSELECTED('Table (2)'[Year])))
You can also download the attachment for more details.
If that's not the outcome you want, do what @ryan_mayu says, provide some dummy data along with the desired outcome.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @unknown917 ,
Could you please tell me if your problem has been solved?
If so, please accept the reply as solution, more people will benefit from it.
If not, please provide me with more details about your problem, thanks.
Best Regards,
Stephen Tao
Hi,
This simple measure should work
Customer count = distinctcount(Data[Customer #])
Hope this helps.
Hi @unknown917 ,
Based on your description, I've created some dummy data as well as metrics, check them out
If there's no relationship between tables. You can create the measure as
count distinct customer numbers = CALCULATE(DISTINCTCOUNT('Table'[Customer]),FILTER('Table',[Week] in ALLSELECTED('Table (2)'[Week])&&[Year] in ALLSELECTED('Table (2)'[Year])))
You can also download the attachment for more details.
If that's not the outcome you want, do what @ryan_mayu says, provide some dummy data along with the desired outcome.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you, @Anonymous
could you pls provide some sample data and expected output?
Proud to be a Super User!
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 77 | |
| 37 | |
| 31 | |
| 29 | |
| 26 |