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

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

Reply
kathyyy19
Helper III
Helper III

Is it possible to display bi-weekly dates on X-axis of a chart instead of weekly dates?

Hello Everyone!

I'm helping my team with weekly reporting (from every Thursday to the following Wednesday) since last year but the x-axis gets busier and busier as all the start of the week dates are displayed on the chart. Hence, I'm trying to make some changes to the x-axis to show only every other start of the week dates (i.e. bi-weekly week dates). 

This is how the x-axis looks like: 

kathyyy19_0-1706216160474.png

 

This is what I would like to achieve: 

kathyyy19_1-1706216208693.png

 

I still would like all weekly data to be shown on the columns/bars of the chart but would like to hide some week dates on the X-axis. 

Thank you in advance for your help and advice!

Kathy

5 REPLIES 5
Ritaf1983
Super User
Super User

Hi @kathyyy19 
Yes, you need to add the column date of the start week to your date table.
And use it on the x-axis.

Please refer to the linked tutorial:
https://bielite.com/blog/week-start-date-power-bi-dax/

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

 

v-xiandat-msft
Community Support
Community Support

Hi @kathyyy19 ,

Below is my table:

vxiandatmsft_0-1706237246082.png

I created an index column in the power query, and then I filtered the index column for all even numbers to indicate bi-weekly

vxiandatmsft_1-1706237312201.png

The final output is shown in the following figure:

vxiandatmsft_2-1706237341693.png

Best Regards,

Xianda Tang

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

Hi @v-xiandat-msft ,

 

Thank you very much for taking the time to show me how to achieve the outcome. However, is it possible to show the bars from the hidden weeks but hide the dates on the X-axis ONLY? For example, for 5/25/2023, I still would like the bar to be shown on the chart but this date on the x-axis is hidden.

 

Thank you,

Kathy

Hi @kathyyy19 ,

Sorry, I misunderstood before.

Now I give a new solution:

You'll need a date table with a column that identifies the bi-weekly period. This could be done by creating a new column in your date table using DAX that flags every other week.

colum = IF(MOD(ROUNDUP(([Date]-MIN('Table'[data])/14), 0), 2) = 0, "Show", "Hide")

Like this:

vxiandatmsft_0-1706498414315.png

This column is then put into the filter and we show the specific values

Here's the filtered graph:

vxiandatmsft_1-1706498462313.png

Here's the unscreened image:

vxiandatmsft_2-1706498537264.png

Best Regards,

Xianda Tang

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

Hi @v-xiandat-msft ,

 

Thank you for the new solution. However, I still think there was misunderstanding about my question. So sorry that I didn't make it clearer.  Below chart is what I would like to achieve. I would like to keep all bars on the chart but only showing every other weeks on the x-Axis. For instance, the data bar for 5/25/2023 is shown on the chart but the data is hidden on the x-axis.

 

kathyyy19_0-1706538329157.png

Thank you!

Kathy

 

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.