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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

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
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.