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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Anonymous
Not applicable

calculating new customers

Hello,

 

I have a FY filter on my dasboard, for example I am selected on FY24 currently, the FY starts in July so the data is populating for July 2023 - Dec 2023. Now I want to compare the IDs from the previous FY to current FY and return the count of IDs that are in the Current FY that were not in the previous. The comparsion needs to be July 2022 - Dec 2022 vs. July 2023 - Dec 2023 etc. because of the FY start date. This is the DAX i am using but the calculation is not populating correctly, what am I doing wrong?

 

example file 

 

in this file I created a measure called New Customers in Curreny FY, it should return 2 but its showing 7

 

New Customers in Current FY =

VAR CurrentFYYear = MAX('Calendar'[Fiscal Year Number])
VAR OneYearAgoMaxFYMonth = EDATE(MAX('Calendar'[Fiscal Month]), -12)
VAR OneYearAgoMinFYMonth = EDATE(MIN('Calendar'[Fiscal Month]), -12)

VAR NewCustomers =
    CALCULATETABLE(
        DISTINCT('Customers'[ID]),
        FILTER(
           ALL('Calendar'),
            'Calendar'[Fiscal Year Number] = CurrentFYYear
        )
    )

VAR PreviousCustomers =
    CALCULATETABLE(
        DISTINCT('Customers'[ID]),
        DATESBETWEEN('Customers'[Fiscal Month], OneYearAgoMinFYMonth, OneYearAgoMaxFYMonth)
             
        )

VAR NewCustomersCount =
    COUNTROWS(
        EXCEPT(
            NewCustomers,
            PreviousCustomers
        )
    )

RETURN NewCustomersCount
1 ACCEPTED SOLUTION

Hi,

The answer should be 2.  PBI file attached.

Hope this helps.

Ashish_Mathur_0-1703819955759.png

 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

7 REPLIES 7
Ashish_Mathur
Super User
Super User

Hi,

Share the download link of the PBI file and clearly show the problem there.  You may anonymise the data, if you wish to.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

Access Denied message.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

@Ashish_Mathur  sorry, try this: File 

 

Hi,

Not able to open the file

Ashish_Mathur_0-1703744849617.png

 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

Hi,

The answer should be 2.  PBI file attached.

Hope this helps.

Ashish_Mathur_0-1703819955759.png

 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

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