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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Filtering Date + 7 Days

Hi,

 

I was wondering if there was a way to create a column or filter so that if you select a specific date, it shows that given date plus a week, or 7 days for the rest of the year/given years.
So far, I have used this formula : 

Date + 7 = Format('Calendar'[Official Date]+7,"mm/dd/yyyy")
but this gives all the days + 7 days and not one specific day, and 7 days plus that date, plus 7 days plus that second date, etc.
Please let me know if my question is confusing....

Thank you !!!
1 ACCEPTED SOLUTION

Hi @Anonymous ,

 

Please check the measure below and see if the result achieve your expectation.

Measure = 
var sv = SELECTEDVALUE('CALENDAR'[Date])
return 
IF(MAX('Table'[Date])<sv,BLANK(),IF(MOD(DATEDIFF(sv,MAX('Table'[Date]),DAY),7)=0,MAX('Table'[Date])))

1.PNG

2.PNG

3.PNG 

BTW, Pbix as attached, hopefully works for you.

 

Best Regards,

Jay

Community Support Team _ Jay Wang

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

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

View solution in original post

6 REPLIES 6
parry2k
Super User
Super User

@Anonymous what you are trying to achieve?



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

In Excel, for example, if column A1 had the value of "1/1" and I type "A1+7" in column A2, this would result in "1/8". Doing this for the rest of column A for a whole year would give me data from "1/1" every week 

If I were to change A1 to "1/2" this would result in A2 to be "1/9" and so forth for the rest of the column A 

I am trying to do this in BI, but I am unsure how to correctly filter or calculate a column so that if I were to chose one date, it would filter for the rest of the column for 1 week at a time

 

Thank you!
Sarah

@Anonymous still not sure what the end goal is ? you want to apply this in a measure, filter a visual/page, what this calculation is going to do? 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

In the end this would show weekly data for a report that was done in Tableau, but will be shifted to BI... 

also this report breaks weekly totals down by regions of DC, MD, and VA

Overall, this report has been done in Excel and Tableau, but there is a shift of resources to Power BI 

 

Thank you !
Sarah 

Hi @Anonymous ,

 

Please check the measure below and see if the result achieve your expectation.

Measure = 
var sv = SELECTEDVALUE('CALENDAR'[Date])
return 
IF(MAX('Table'[Date])<sv,BLANK(),IF(MOD(DATEDIFF(sv,MAX('Table'[Date]),DAY),7)=0,MAX('Table'[Date])))

1.PNG

2.PNG

3.PNG 

BTW, Pbix as attached, hopefully works for you.

 

Best Regards,

Jay

Community Support Team _ Jay Wang

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

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.
Anonymous
Not applicable

amazing thank you so much!
Sarah

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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