Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
QaisAltwal
Frequent Visitor

Calculate number of distinct customers in last 90 days

Hello,

 

I need help in how to calculate the total number of distinct customers in the last 90 days. below is a sample for the file.

PowerBI Community - OneDrive (sharepoint.com)

 

thank you

4 REPLIES 4
QaisAltwal
Frequent Visitor

Actually it did not work due to "too many arguments" error.

 

can you please try again using the sample data below:

CustomerIDTransaction Date
91748153/1/2022
91748163/1/2022
91748153/1/2022
91748183/1/2022
91748153/1/2022
91748203/1/2022
91748213/1/2022
91748164/1/2022
91748154/1/2022
91748184/1/2022
91748254/1/2022
91748274/1/2022
91748284/1/2022
91748294/1/2022
91748314/1/2022
91748344/1/2022
91748354/1/2022
91748364/1/2022
91748374/1/2022
91748384/1/2022
91748394/1/2022
91748404/1/2022
91748444/1/2022
91748454/1/2022
91748464/1/2022
91748474/1/2022
91748484/1/2022
91748494/1/2022
91748514/1/2022
91748524/1/2022
91748544/1/2022
91748554/1/2022
91748564/1/2022
91748574/1/2022
91748594/1/2022
91748254/2/2022
91748274/2/2022
91748284/2/2022
91748294/2/2022
91748314/2/2022
91748344/2/2022
91748674/2/2022
91748684/2/2022
91748694/2/2022
91748704/2/2022
91748714/2/2022
91748724/2/2022
91748754/2/2022
91748764/2/2022
91748774/2/2022

All is ok, thank you all for the support.

Anonymous
Not applicable

Hi  @QaisAltwal ,

I don't have permission to access your data, I created some myself

vyangliumsft_0-1655880391102.png

Here are the steps you can follow:

1. Create measure.

Measure =
CALCULATE(DISTINCTCOUNT('Table'[Customer])
,
 FILTER(ALL('Table'),
'Table'[Date]>=
DATE(YEAR(TODAY()),MONTH(TODAY()),DAY(TODAY())-90)&&'Table'[Date]<=TODAY()))

2. Result:

vyangliumsft_1-1655880391103.png

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

YukiK
Impactful Individual
Impactful Individual

I haven't looked at the file you attached, but you should be able to something like this! 

 

CALCULATE (

    [DISTINCT CUSTOMERS],

    DATESINPERIOD (

        'Date'[Date],

        MAX ( 'Date'[Date] ),

        -90,

        DAY

    )

)

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors