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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
vijay_pbi
New Member

How to show 2weeks data in a column chart

Hi Everyone,

Recently, I came up with a requirement to show a Clustered column chart where x-axis shows 2week period (chart 1). I have used a calender table in powerquery, where i have created a column using Date.StartOfWeek and Date.EndOfWeek.

Now to achieve this requrirement I have created one more column by using Date.AddDays to add 14 days to current end date. When i created a clustered column chart with this new field, it gives 14days range between each column, but the next column start date differs (see chart 2).

 

May I know your thoughts to fix this ?

 

Requirement -Chart1

vijay_pbi_0-1713247127758.png

Wrong chart - chart2

vijay_pbi_1-1713247523919.png

 

 

1 ACCEPTED SOLUTION
Joe_Barry
Super User
Super User

Hi @vijay_pbi 

 

The new column needs to be numerically sorted. You will need to create another column where each new two week period has a numericaly sort number. Then when you load this you will need to sort the two week column by the sort column.

 

I would suggest for the sort column create a column that shows the start date of the two week period and use this for sorting

 

Thanks

Joe

 

If you found my answer helpful and it solved your issue, please accept as solution




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Learn about the Star Schema, it will solve many issues in Power BI!

Date tables help! Learn more



LinkedIn
Let's connect on LinkedIn


View solution in original post

1 REPLY 1
Joe_Barry
Super User
Super User

Hi @vijay_pbi 

 

The new column needs to be numerically sorted. You will need to create another column where each new two week period has a numericaly sort number. Then when you load this you will need to sort the two week column by the sort column.

 

I would suggest for the sort column create a column that shows the start date of the two week period and use this for sorting

 

Thanks

Joe

 

If you found my answer helpful and it solved your issue, please accept as solution




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Learn about the Star Schema, it will solve many issues in Power BI!

Date tables help! Learn more



LinkedIn
Let's connect on LinkedIn


Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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