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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
datatbl123
Helper I
Helper I

Sum of a value showing for the first time in the last 12 months

I would like a formula that will calculate the count of new billed clients looking at the previously 12-months history of billed clients. Client 3 shows an example of a new client that wasn't billed before so the total count of all clients should be 1. The other clients, when looking at the latest column (December), that have a 1 in the December column look like they have been billed at least more than once in the previous 12 months so these should not be included in the calculation. I am looking for a formula that would use the current month as the month to use to compare to the previous 12 months.

 

example.jpg

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi,

One of ways to solve this is, try to use EXCEPT DAX function in a measure.

EXCEPT function (DAX) - DAX | Microsoft Learn

 

Please try writing a measure something like similar to below.

 

new customer list count in current month measure: =
VAR _currentmonthcustomerlist =
    DISTINCT ( Customer[Customer] )
VAR _prevelevenmonthscustomerlist =
    CALCULATETABLE (
        DISTINCT ( Customer[Customer] ),
        DATESBETWEEN (
            Calendar[Date],
            EOMONTH ( MAX ( Calendar[Date] ), -12 ) + 1,
            EOMONTH ( MAX ( Calendar[Date] ), -1 )
        )
    )
RETURN
    COUNTROWS (
        EXCEPT ( _currentmonthcustomerlist, _prevelevenmonthscustomerlist )
    )

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

View solution in original post

2 REPLIES 2
Jihwan_Kim
Super User
Super User

Hi,

One of ways to solve this is, try to use EXCEPT DAX function in a measure.

EXCEPT function (DAX) - DAX | Microsoft Learn

 

Please try writing a measure something like similar to below.

 

new customer list count in current month measure: =
VAR _currentmonthcustomerlist =
    DISTINCT ( Customer[Customer] )
VAR _prevelevenmonthscustomerlist =
    CALCULATETABLE (
        DISTINCT ( Customer[Customer] ),
        DATESBETWEEN (
            Calendar[Date],
            EOMONTH ( MAX ( Calendar[Date] ), -12 ) + 1,
            EOMONTH ( MAX ( Calendar[Date] ), -1 )
        )
    )
RETURN
    COUNTROWS (
        EXCEPT ( _currentmonthcustomerlist, _prevelevenmonthscustomerlist )
    )

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

This worked, thank you!

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.