cancel
Showing results for
Did you mean:

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

## Plotting Data Weekly

I have this data below which is collected once a week. I've tried a few differnt ways of plotting this and Power BI doesn't seem to like it. What am I missing and how can I work with this data?

 1-Jun 5 8-Jun 11 15-Jun 16 22-Jun 22 29-Jun 30 6-Jul 32 13-Jul 34 20-Jul 37 27-Jul 40 3-Aug 45
2 ACCEPTED SOLUTIONS
Community Champion

Week = YEAR(Table[Date])&"-"&WEEKNUM(Table[Date])

https://msdn.microsoft.com/en-us/library/ee634572.aspx

@Sean

That is a lot more elegant than the solution I was attempting to work towards. Thanks!

6 REPLIES 6
Community Champion

what exactly doesn't PBI like?

Regular Visitor

I am new to Power BI and have tried to plot similar weekly data. I tried using the formula given in the post but I couldn't get it to work. Please could somebody show me how to do this so that I can show data collected on a weekly basis on a graph, and show the date rather than week number on the axis (just as in the example above)

@Sean

Thanks for the fast reply! What's going on in your table with Week?

Community Champion

Week = YEAR(Table[Date])&"-"&WEEKNUM(Table[Date])

https://msdn.microsoft.com/en-us/library/ee634572.aspx

@Sean

That is a lot more elegant than the solution I was attempting to work towards. Thanks!

Community Champion

@travbum Well since you said "elegant" now I feel compelled to give you the solution that will sort weeks 1 thru 9 properly

```Year-Week =
YEAR ( 'Calendar'[Date] ) & "-"
& CONCATENATE (
IF ( WEEKNUM ( 'Calendar'[Date] ) < 10, "0", "" ),
WEEKNUM ( 'Calendar'[Date] )
)```

Announcements

#### Fabric certifications survey

Certification feedback opportunity for the community.

#### Power BI Monthly Update - April 2024

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

#### Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors