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.
Hi
I have a below table. Total Customers are 4002 (took distinct count of customer ID). Each customer ID is has multiple login date. I want to calculate how many unique customers (unique customer id) for every week
this is the actual data
I need an output like below
Just to calculate unique customer ID for every week. I don't want multiple customer ID repeats every week. Most of the customer ID's has multiple same login date for each day and week.
Attached is the sample pbix file https://we.tl/t-vF9b2y6IHg
Can anyone advise?
Solved! Go to Solution.
This sound similar to this prior question:
https://community.powerbi.com/t5/Desktop/Distinct-Count-Measure-in-Table-by-Date-repeating-counts/m-...
Distinct New Customers =
VAR CurrDate = MIN ( sessions[Login Date])
VAR CurrCust = VALUES ( sessions[customer_id] )
VAR PrevCust =
CALCULATETABLE (
VALUES ( sessions[customer_id] ),
ALL ( sessions ),
sessions[Login Date] < CurrDate
)
RETURN
COUNTROWS ( EXCEPT ( CurrCust , PrevCust ) )
Hi,
You should ideally have a Calendar Table with a Week number column. Create a relationship from the Date column of the Data Table to the Date column of the Calendar Table. To your Table visual, drag Week number from the Calendar Table. Write this measure
Measure = distinctcount(Data[Customer_ID])
Hope this helps.
This sound similar to this prior question:
https://community.powerbi.com/t5/Desktop/Distinct-Count-Measure-in-Table-by-Date-repeating-counts/m-...
Distinct New Customers =
VAR CurrDate = MIN ( sessions[Login Date])
VAR CurrCust = VALUES ( sessions[customer_id] )
VAR PrevCust =
CALCULATETABLE (
VALUES ( sessions[customer_id] ),
ALL ( sessions ),
sessions[Login Date] < CurrDate
)
RETURN
COUNTROWS ( EXCEPT ( CurrCust , PrevCust ) )
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 |
|---|---|
| 76 | |
| 37 | |
| 31 | |
| 29 | |
| 26 |