March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Dear All,
I have a datasource, where we insert updates by weekly (every week have an increase in task progress and we instert it with relevant date)
I need to calculate the progress deviation between the latest entry in the system and the previous week.
So I created a measure to calculate the AVG Progress for the Latest Date (which is 5th August) ->
Solved! Go to Solution.
Hi @ruyaselman ,
You need to create a new column.
Previous Week = CALCULATE ( FIRSTNONBLANK ( Sheet1[Progress], 1 ), FILTER ( Sheet1, Sheet1[date] = EARLIER ( Sheet1[date] ) - 7 && Sheet1[Task] = EARLIER ( Sheet1[Task] ) ) )
Then edit your measure.
Progress for Previous Date = CALCULATE ( AVERAGE ( Sheet1[Previous Week] ) )
Here is the result.
Best Regards,
Eads
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @ruyaselman ,
You can create a new column in "Original DS".
Previous Week = VAR a = CALCULATE ( LASTDATE ( 'Original DS'[PrgDate] ), ALL ( 'Original DS' ) ) RETURN IF ( 'Original DS'[PrgDate] = a, BLANK (), 'Original DS'[PrgDate] )
Then edit your meaure "Progress for Previous Date Original DS"
Progress for Previous Date Original DS = CALCULATE(AVERAGE('Original DS'[Task Progress %]),LASTDATE('Original DS'[Previous Week]))
Here is the result:
Best Regards,
Eads
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @ruyaselman ,
You need to create a new column.
Previous Week = CALCULATE ( FIRSTNONBLANK ( Sheet1[Progress], 1 ), FILTER ( Sheet1, Sheet1[date] = EARLIER ( Sheet1[date] ) - 7 && Sheet1[Task] = EARLIER ( Sheet1[Task] ) ) )
Then edit your measure.
Progress for Previous Date = CALCULATE ( AVERAGE ( Sheet1[Previous Week] ) )
Here is the result.
Best Regards,
Eads
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Again @v-eachen-msft.,
Thank you so much for your response. I tried in my original data source however it didnt work 😞
Because I have some additional columns in my Data Source, where I have relations.
Actually I`m filtering my tasks, based on Channel-Location-Owner & Component Levels. Also BackEnd/FrontEnd is another parameter for filtering. With this way, each Team provide their tasks.
Same Tasks are applicable to different Teams and different Locations and different Components Actually. So you will see many replicated records. Adding different columns is the only way to segregate in the Date Source.
I need to calculate the previous progress for a specific Channel, Location & a Team, so while I`m calculating this I need to consider other fields :S I think I need to add some other filters to specify the calculation however I couldnt sort it out.
Kindly find below the pbix with original DS;
Hi @ruyaselman ,
You can create a new column in "Original DS".
Previous Week = VAR a = CALCULATE ( LASTDATE ( 'Original DS'[PrgDate] ), ALL ( 'Original DS' ) ) RETURN IF ( 'Original DS'[PrgDate] = a, BLANK (), 'Original DS'[PrgDate] )
Then edit your meaure "Progress for Previous Date Original DS"
Progress for Previous Date Original DS = CALCULATE(AVERAGE('Original DS'[Task Progress %]),LASTDATE('Original DS'[Previous Week]))
Here is the result:
Best Regards,
Eads
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Dear @v-eachen-msft ,
Thank you so much for your support and immediate response. With this function it worked.
Just to understand, why did we need the Variable? Could you please tell? I never used it before actually.
Best Regards,
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
114 | |
76 | |
57 | |
52 | |
44 |
User | Count |
---|---|
165 | |
116 | |
63 | |
57 | |
50 |