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! Learn more

Reply
Coffee2023
Frequent Visitor

Finding row values for last 8 days based on expression that calculates the difference in days

Hi, I need to find the pages entered Delta (new Delta Column) from the last 8 days, based on my created expression ("custom") which calculates the difference in days between my create date and today (See below screenshot column named custom). 

 

Here is my current measure and one line of data.

Delta = CALCULATE(SUMX('All Programs DE','All Programs DE'[Pages Entered], FILTER('All Programs DE', 'All Programs DE'[Custom], <8))
 

Coffee2023_1-1718743757298.png

 

Thank you in advance for your help!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Coffee2023 ,

Based on my testing, please try the following methods again:

1.Create the simple tables.

vjiewumsft_0-1718766087396.png

2.Create the new custom column to calculate the difference.

Custom = 
var today_ = TODAY()
RETURN
DATEDIFF('All Programs DE'[Create Date], today_, DAY)

vjiewumsft_1-1718766100250.png

3.Create the new measure to filter the row values.

Delta = 
CALCULATE(
    SUMX(
        'All Programs DE',
        'All Programs DE'[Pages Entered]
    ),
    FILTER(
        'All Programs DE',
        'All Programs DE'[Custom] < 8
    )
)

4.The result is shown below.

vjiewumsft_2-1718766110432.png

Best Regards,

Wisdom Wu

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

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @Coffee2023 ,

Based on my testing, please try the following methods again:

1.Create the simple tables.

vjiewumsft_0-1718766087396.png

2.Create the new custom column to calculate the difference.

Custom = 
var today_ = TODAY()
RETURN
DATEDIFF('All Programs DE'[Create Date], today_, DAY)

vjiewumsft_1-1718766100250.png

3.Create the new measure to filter the row values.

Delta = 
CALCULATE(
    SUMX(
        'All Programs DE',
        'All Programs DE'[Pages Entered]
    ),
    FILTER(
        'All Programs DE',
        'All Programs DE'[Custom] < 8
    )
)

4.The result is shown below.

vjiewumsft_2-1718766110432.png

Best Regards,

Wisdom Wu

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

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.