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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Measure - rolling one day not include first day

Hi,

Trying to create a rolling 1 day cost to show difference in cost from yesterday, but my measure is including the first day; 

Cost minus previous day = SUM('UsageDetails'[Cost]) - [previous day]

So the first of month the cost was £712 in my [previous day] its blank - but measure has £712 in row rather than 0

1 ACCEPTED SOLUTION

@Anonymous 

 

You may try using ISBLANK.

https://community.powerbi.com/t5/Desktop/Calculating-difference-between-ROWS/m-p/192754#M84843

Community Support Team _ Sam Zha
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

3 REPLIES 3
amitchandak
Super User
Super User

@Anonymous , Refer if these last day formula can help

Last Day Non Continous = CALCULATE(sum('order'[Qty]),filter(all(Table),Table[Date] =MAXX(FILTER(all(Table),Table[Date]<max(Table[Date])),Table[Date])))
Day behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd(Table[Date],-1,Day))

 

To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :
https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions
https://www.archerpoint.com/blog/Posts/creating-date-table-power-bi
https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/

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
Anonymous
Not applicable

I couldnt get the suggested measure to work the output was eg 9159.49 instead of 0.03. I have instead probably not done it the best way 

blank day = if (SUM(UsageDetails[Cost]) = [Cost minus previous day], 0 , SUM('UsageDetails'[Cost]) - [previous day]) the only issue with this is if the dates dont run in order, I shall create a separate calendar table. 

@Anonymous 

 

You may try using ISBLANK.

https://community.powerbi.com/t5/Desktop/Calculating-difference-between-ROWS/m-p/192754#M84843

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

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.

Top Solution Authors