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
mohan_g_das1986
Helper III
Helper III

DAX to show all N completed weeks data

I'm trying to create a Trend graph for last 13 completed weeks, A week runs from Monday to Sunday. See examples below. Help me show last any N completed week excluding incomplete weeks

 

  1. When Today is July 10, 2019 - Last Completed Week is - July 01, 2019 (Monday) to July 7, 2019 (Sunday)
  2. When Today is July 20, 2019 - Last Completed Week is - July 08, 2019 (Monday) to July 14, 2019 (Sunday)

MohanIscurrentweek_issue.JPG

5 REPLIES 5
sokg
Solution Supplier
Solution Supplier

Hi @mohan_g_das1986 

 

Please, can you show us your calendar table?

I dont have Week number in this table,.. i have Start of Week & End of Week dateTime.JPG

I think you solution is to add in your calendar table a week offset column.

Avi explains that very good at the link below

 

https://www.youtube.com/watch?v=NKr2TizM-KU

 

Also you can download this calendar table. Link in the video description .

 

Hopefully this is what you are looking for!

This is not working as we wanted - using the Offset number only when i click on -2 i sent my numbers that to with current week, but for other selections no answerOffSet1.JPGOffSet2.JPGOffSet3.JPG

Please put your CurWeekOffset in the filter pane as show in the pic below

Capture1.JPG

 

and click apply filter.

 

Hopefully this is what you are looking for!

 

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.