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

Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register 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])))

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
May PBI 25 Carousel

Power BI Monthly Update - May 2025

Check out the May 2025 Power BI update to learn about new features.

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

May 2025 Monthly Update

Fabric Community Update - May 2025

Find out what's new and trending in the Fabric community.