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

Incremental Measure

Hi All,

 

I want to create a measure where I want to show the incremental sum of the last 6 weeks. 
For example the values for 05/18 and 05/25 should show just 1 ( 289-288) and rest should show 0 ( 288-288).
Any help how to achieve this?

 

So basically instead of the total sum I want to show the incremental sum her in the measure

 

Himanshu_1306_1-1717073866137.png

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi, @Anonymous 

I create a sample table:

vyohuamsft_0-1717121287284.png

 

Then create a new measure and try the follow DAX expression:

 

 

Incremental_Assessment = 
VAR CurrentWeek = MAX('Table'[Date])
VAR PreviousWeek = CALCULATE(MAX('Table'[Date]), DATEADD('Table'[Date], -7, DAY))
VAR CurrentWeekSum = CALCULATE(SUM('Table'[Total Assessments]), 'Table'[Date] = CurrentWeek)
VAR PreviousWeekSum = CALCULATE(SUM('Table'[Total Assessments]), 'Table'[Date] = PreviousWeek)
RETURN
IF(CurrentWeekSum > PreviousWeekSum, CurrentWeekSum - PreviousWeekSum, 0)

 

 

 

Here is my preview:

vyohuamsft_4-1717121722778.png

 

If you want to show the last 6 weeks, you can use the filter or slicer to filter it.

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data)

 

How to Get Your Question Answered Quickly 

Best Regards

Yongkang Hua

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

5 REPLIES 5
Anonymous
Not applicable

Hi, @Anonymous 

I create a sample table:

vyohuamsft_0-1717121287284.png

 

Then create a new measure and try the follow DAX expression:

 

 

Incremental_Assessment = 
VAR CurrentWeek = MAX('Table'[Date])
VAR PreviousWeek = CALCULATE(MAX('Table'[Date]), DATEADD('Table'[Date], -7, DAY))
VAR CurrentWeekSum = CALCULATE(SUM('Table'[Total Assessments]), 'Table'[Date] = CurrentWeek)
VAR PreviousWeekSum = CALCULATE(SUM('Table'[Total Assessments]), 'Table'[Date] = PreviousWeek)
RETURN
IF(CurrentWeekSum > PreviousWeekSum, CurrentWeekSum - PreviousWeekSum, 0)

 

 

 

Here is my preview:

vyohuamsft_4-1717121722778.png

 

If you want to show the last 6 weeks, you can use the filter or slicer to filter it.

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data)

 

How to Get Your Question Answered Quickly 

Best Regards

Yongkang Hua

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

Anonymous
Not applicable

Thanks @Anonymous for the update

I actually wanted the incremental to run like current week compared to the 6th week in past so I tweeked the measure a bit and I think I've got my output . 
I wanted to subtract my current week count with the count from 6th Week in the past ( Currentweek - 6WeekAgo count)

Himanshu_1306_1-1717139660236.png

 



Anonymous
Not applicable

I want something like below , the last column

Himanshu_1306_1-1717080838276.png


The below measure is still not working,
any urgent help here?

IncrementalCountLast6Weeks =
VAR CurrentWeek = WEEKNUM(TODAY())
VAR Last6Weeks =
    FILTER(
        VALUES(DateTable[WeekNumber]),
        DateTable[WeekNumber] >= CurrentWeek - 5 && DateTable[WeekNumber] <= CurrentWeek
    )
RETURN
CALCULATE(
    [WeeklyAssessmentCount1],
    Last6Weeks
)

Himanshu_1306_2-1717080884780.png

 

Hi,

Share the download link of the PBI file.


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

Instead of addition can I get subtraction here?

Himanshu_1306_0-1717074807376.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.