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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
RURURU
Frequent Visitor

Calculation of last 15 month from the point another measure = 1

hello guys, 
i have issue with dax measure.. 
i need a dax measure who calculate all fees from last 15 month but i need him to starts summring from the individual point for each payer which is dax measure as well who have a 1 or 0 value 
until now i tried a lot of versuin like that and keep getting this error 
A function 'PLACEHOLDER' has been used in a True/False expression that is used as a table filter expression. This is not allowed.

test measure  =
VAR LastChangeDate =
    CALCULATE (
        MAX (dimDate[Date]),
        [churn] = 1,
        dimDate[Date] > EDATE ( TODAY(), -15 ))
   
RETURN
    CALCULATE (
        [All Fees],
        FILTER (
            ALL ( dimDate[Date] ),
            dimDate[Date] > EDATE ( LastChangeDate, -15 )
                && dimDate[Date] <= LastChangeDate
        )
    )
try as well to use dateadd but keep getting this error.
how can i sum the last 15 month from the point [churn] = 1 
1 ACCEPTED SOLUTION

Try

test measure =
SUMX (
    VALUES ( 'Payer'[Payer ID] ),
    VAR LastChangeDate =
        CALCULATE (
            MAX ( dimDate[Date] ),
            FILTER (
                ALL ( dimDate[Date] ),
                [churn] = 1
                    && dimDate[Date] > EDATE ( TODAY (), -15 )
            )
        )
    RETURN
        IF (
            NOT ISBLANK ( LastChangeDate ),
            CALCULATE (
                [All Fees],
                FILTER (
                    ALL ( dimDate[Date] ),
                    dimDate[Date] > EDATE ( LastChangeDate, -15 )
                        && dimDate[Date] <= LastChangeDate
                )
            )
        )
)

View solution in original post

3 REPLIES 3
johnt75
Super User
Super User

You need to iterate over the individual payers, so that the calculation is done for each row. Try

test measure =
SUMX (
    VALUES ( 'Payer'[Payer ID] ),
    VAR LastChangeDate =
        CALCULATE (
            MAX ( dimDate[Date] ),
            [churn] = 1,
            dimDate[Date] > EDATE ( TODAY (), -15 )
        )
    RETURN
        IF (
            NOT ISBLANK ( LastChangeDate ),
            CALCULATE (
                [All Fees],
                FILTER (
                    ALL ( dimDate[Date] ),
                    dimDate[Date] > EDATE ( LastChangeDate, -15 )
                        && dimDate[Date] <= LastChangeDate
                )
            )
        )
)

A function 'PLACEHOLDER' has been used in a True/False expression that is used as a table filter expression. This is not allowed. 
getting this error again 

Try

test measure =
SUMX (
    VALUES ( 'Payer'[Payer ID] ),
    VAR LastChangeDate =
        CALCULATE (
            MAX ( dimDate[Date] ),
            FILTER (
                ALL ( dimDate[Date] ),
                [churn] = 1
                    && dimDate[Date] > EDATE ( TODAY (), -15 )
            )
        )
    RETURN
        IF (
            NOT ISBLANK ( LastChangeDate ),
            CALCULATE (
                [All Fees],
                FILTER (
                    ALL ( dimDate[Date] ),
                    dimDate[Date] > EDATE ( LastChangeDate, -15 )
                        && dimDate[Date] <= LastChangeDate
                )
            )
        )
)

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.