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
Anonymous
Not applicable

Using Temporary Columns within Measure

Can someone please give me a quick explaination on why I can't use my [NextMonth] in the DateAdd funtion.

 

EVALUATE
ADDCOLUMNS (
    SUMMARIZE (
        Customers,
        Customers[CustomerKey],
        Customers[DateFirstPurchase],
        "Second Purchase",
            CALCULATE (
                FIRSTDATE ( Sales[OrderDate] ),
                FILTER ( Sales, Sales[OrderDate] > Customers[DateFirstPurchase] )
            ),
        "90 Day Date After First Purchase", Customers[DateFirstPurchase] + 90,
        "NextMonth", ENDOFMONTH ( Customers[DateFirstPurchase] ) + 1
    ),
    "Next3Months", DATEADD ( [NextMonth] , 3, MONTH ),
    "Within 90 Days",
        IF (
            [Second Purchase] > [DateFirstPurchase]
                && [Second Purchase] <= [90 Day Date After First Purchase],
            "Yes",
            "No"
        )

 

1 ACCEPTED SOLUTION
daXtreme
Solution Sage
Solution Sage

1 REPLY 1
daXtreme
Solution Sage
Solution Sage

daXtreme_0-1661980733158.png

daXtreme_1-1661980767693.png

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

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

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.