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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
CEllis
Resolver I
Resolver I

Bring forward weekly measure where their is no data.

 

I am trying to achive a weekly continuation where there is no data.

 

Data Set 1 stops on the 24th May and doesnt continue because there is no more data entered.

Data Set 2 continues to have data entered.

Cummulative is Data Set 1 and Data Set 2 cummulative figure to date

 

Can Data Set 1 appear in the Cummulative figure after the 24th May ?

 

Sample Chart

CEllis_1-1718023388360.png

 

 

Data Set 1 and Data Set 2 = 

Var _Today = TODAY()
//-7 is to get the previouse full week.
Var DateBetween = DATESBETWEEN('Attendance (Table)'[Mark date],MIN('Academic Year (Table)'[Dates]),MAX('Today (Table)'[End of week])-7)

Var Present         =  CALCULATE(SUM('Attendance (Table)'[Present]),DateBetween)
Var Authorised      =  CALCULATE(Sum('Attendance (Table)'[Authorised Absence]),DateBetween)
Var UnAuthorised    =  CALCULATE(Sum('Attendance (Table)'[UnAuthorised]),DateBetween)
Var AEA             =  CALCULATE(Sum('Attendance (Table)'[AEA]),DateBetween)

Var TotalPresent    = (Present+AEA)
Var Absent          = (Authorised+UnAuthorised)
Var TotalMarks      = TotalPresent+Absent

Return

        IFERROR((TotalPresent/TotalMarks),0))

 

Cummulative = 

Var Present = 
	CALCULATE (SUM ('Attendance (Table)'[Present]),FILTER (ALL ( 'Academic Year (Table)'[Week Ending] ),'Academic Year (Table)'[Week Ending]  <= MAX ( 'Academic Year (Table)'[Week Ending])))
	+
	CALCULATE (SUM ('Attendance (Table)'[AEA]),FILTER (ALL ( 'Academic Year (Table)'[Week Ending] ),'Academic Year (Table)'[Week Ending]  <= MAX ( 'Academic Year (Table)'[Week Ending])))

Var absent =
	CALCULATE (SUM ('Attendance (Table)'[Authorised Absence]),FILTER (ALL ( 'Academic Year (Table)'[Week Ending] ),'Academic Year (Table)'[Week Ending]  <= MAX ( 'Academic Year (Table)'[Week Ending])))
	+
	CALCULATE (SUM ('Attendance (Table)'[UnAuthorised]),FILTER (ALL ( 'Academic Year (Table)'[Week Ending] ),'Academic Year (Table)'[Week Ending]  <= MAX ( 'Academic Year (Table)'[Week Ending])))

Var Overall = Present+absent

Return

IFERROR(Present/Overall,0)

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @CEllis ,

 

Thanks @amitchandak  for the quick reply, allow me to provide another insight:

You can create a measure.

MEASURE =
CALCULATE (
    SUM ( 'Attendance (Table)'[AEA] ),
    FILTER (
        ALL ( 'Attendance (Table)' ),
        [Date] <= MAX ( 'Academic Year (Table)'[Week Ending] )
    )
)


Then the result is as follows.

vtangjiemsft_1-1718160524838.png

If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.

 

Best Regards,

Neeko Tang

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

2 REPLIES 2
Anonymous
Not applicable

Hi @CEllis ,

 

Thanks @amitchandak  for the quick reply, allow me to provide another insight:

You can create a measure.

MEASURE =
CALCULATE (
    SUM ( 'Attendance (Table)'[AEA] ),
    FILTER (
        ALL ( 'Attendance (Table)' ),
        [Date] <= MAX ( 'Academic Year (Table)'[Week Ending] )
    )
)


Then the result is as follows.

vtangjiemsft_1-1718160524838.png

If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.

 

Best Regards,

Neeko Tang

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

amitchandak
Super User
Super User

@CEllis , is dataset 2 means 'Academic Year (Table)'[Week Ending] 

This table should have all the dates of week ending to work

 

measure like below should work

CALCULATE (SUM ('Attendance (Table)'[AEA]),FILTER (ALL ( 'Academic Year (Table)'[),'Academic Year (Table)'[Week Ending] <= MAX ( 'Academic Year (Table)'[Week Ending])))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

January Power BI Update Carousel

Power BI Monthly Update - January 2026

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