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
reh169
Helper IV
Helper IV

Year over Year Comparison by Week

I have data for several grabed every Friday. The date that I use for this is the load date. I want to be able to graph the data year over year by week. How do I this? Here is a sample of what the data looks like. I am listing it in rows by city.datasample.PNG

1 ACCEPTED SOLUTION

Hi @reh169 ,

 

The weeknum function will calculate for each rows when create a calculated column, if there are multi rows have same date, they will have the same week number, then the value will calculate all the data with the same week.

 

28.PNG

 


BTW, pbix as attached.

 

Best regards,

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

Community Support Team _ Dong Li
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
v-lid-msft
Community Support
Community Support

Hi @reh169 ,

 

We can add a calculate column Week to meet your requirement.

 

Week = WEEKNUM('Data'[Date])

28.PNG

 

If it doesn't meet your requirement, Please show the exact expected result based on the Tables in sample pbix file.

 


BTW, pbix as attached.

 

Best regards,

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

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

So it seems that the weeknum calculation will only work if there is one instance of the date. I have more than 50 lines of data for each date. I am looking at yard data so I have lots of yards that have data for those specific dates. Is there another function that will work?

Hi @reh169 ,

 

The weeknum function will calculate for each rows when create a calculated column, if there are multi rows have same date, they will have the same week number, then the value will calculate all the data with the same week.

 

28.PNG

 


BTW, pbix as attached.

 

Best regards,

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

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

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.