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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Anonymous
Not applicable

Fill in the gaps in meter reading table

Hi all,

I really stuck here to fill in the gap.  Please help!!

From:

babyjb123_1-1655147135755.png

To:

babyjb123_2-1655147147659.png

Thank you!!!!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous 

Create a column like this :

Column 2 = 
var _a= CALCULATE(MAX('Table'[Date]),FILTER(ALL('Table'),[Type]=EARLIER('Table'[Type])&&[Date]<EARLIER('Table'[Date])&&[Reading]<>BLANK()))
return IF([Reading]<>BLANK(),[Reading],CALCULATE(MAX('Table'[Reading]),FILTER(ALL('Table'),[Type]=EARLIER('Table'[Type])&&[Date]=_a)))

The final result is as shown :

Ailsamsft_0-1655361422998.png

I have attached my pbix file , you can refer to it .

 

Best Regards,
Community Support Team _ Ailsa Tao
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 @Anonymous 

Create a column like this :

Column 2 = 
var _a= CALCULATE(MAX('Table'[Date]),FILTER(ALL('Table'),[Type]=EARLIER('Table'[Type])&&[Date]<EARLIER('Table'[Date])&&[Reading]<>BLANK()))
return IF([Reading]<>BLANK(),[Reading],CALCULATE(MAX('Table'[Reading]),FILTER(ALL('Table'),[Type]=EARLIER('Table'[Type])&&[Date]=_a)))

The final result is as shown :

Ailsamsft_0-1655361422998.png

I have attached my pbix file , you can refer to it .

 

Best Regards,
Community Support Team _ Ailsa Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

What my DAX is :

Average to Everyday =
VAR LastNonBlankDate =
CALCULATE (
LASTNONBLANK ( 'Meter Reading All'[G/L Date], 1 ),
FILTER (
ALL ( 'Meter Reading All' ),
'Meter Reading All'[Date]<= EARLIER ( 'Meter Reading All'[Date] )
)
)
 
RETURN
CALCULATE (
SUM ( 'Meter Reading All'[Average Reading] ),
FILTER ( ALL ( 'Meter Reading All' ),'Meter Reading All'[Date] = LastNonBlankDate )
)
 
but it is not right.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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

Top Solution Authors