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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Time interval with 7 days calculation

Hello Everyone,

 

I am new to power BI, Please help me, I want my chart to be like below,

 

The time interaval for the chart is from ( 03/26(today) to 12/13 ) ( 15 interval total )

each bar is having 7 days data ( sum(measure) for 7 days )

first bar shows the 7 days of data next bar starts from 8th day 

 

please help me creating calculation for the same 

 

Thanks a lot in advance 

 

power bi.png

 

Regards

SV

6 REPLIES 6
Anonymous
Not applicable

@Anonymous 
If you want to get sum of previous 7 days, you can use the following measure, I also have it in column in the pibx.

Measure = CALCULATE(SUM('Table'[Value]),FILTER(ALL('Table'),SUMX(FILTER('Table',EARLIER('Table'[Date])<='Table'[Date]&& EARLIER('Table'[Date])>='Table'[Date]-6),'Table'[Value])))​

But if you want to get date sliced by 7 days, you could just use Group dates. 

I put them in a sample pbix, try combine it with your own data.

https://qiuyunus-my.sharepoint.com/:u:/g/personal/paul_qiuyunus_onmicrosoft_com/EcPRCtKVm35Mo-ZPi8LAgE0B1Miwga1k7OocoB0SH6uLCA?e=g74CYL

 

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

Anonymous
Not applicable

Hi,

 

Thanks a lot for sharing,

 

The solution is provided giving last 7 days sum for each day, but i need bucket wise 

 

I saw the group column with bins, but it looks like the week is starting from sunday, is there any way to make week start based on today, like today()-7the is week start 

 

Regards

Sreeharsha Vemula

amitchandak
Super User
Super User

Are these dynamic buckets based on date

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

Thanks for the reply @amitchandak , yes these buckets are dynamic start always with today

 

Regrads

SV

I created this table, this start today and bucket is created for the next 7 days. Join with your date and try.

 

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
Greg_Deckler
Community Champion
Community Champion

Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 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.

Top Solution Authors