Reply
KWB Frequent Visitor
Frequent Visitor
Posts: 5
Registered: ‎04-28-2017
Accepted Solution

Continuous x-axis issue

I have a problem when using dates in the X-Axis when the type is Continuous.

 

Our period data is stored as the last day of each month and when I put the period in the X-Axis, the axis doesn't line up with the data. This is the result:

 

Axis 1.png

 

The highlighted month should be February, as shown in the black popup, but the axis shows March.

 

When the type is changed to Categorical, it is now correct:

 

Axis 3.JPG

In case it's needed, the test data is:

 

Axis 2.JPG

 

I understand the dates need to be 'flexible' when chosing the continuous type in order for the dates to expand etc, but it can be misleading.

 

I know the other option could be to create another column to show the first day of the period instead of the last, but does anyone have any idea what is going wrong here? And what the best practice would be in this scenario? Ideally it would be better for Power BI to show the correct month without having to create another column.

 

Thanks


Accepted Solutions
Highlighted
tjd Established Member
Established Member
Posts: 202
Registered: ‎02-02-2016

Re: Continuous x-axis issue

In order to properly show dates as "continuous" data, you need to be using dates from a date table, not your non-continuous fact table (that's categorical and why it is showing correctly as categorical).  After building the data table, you link your fact table dates to the date column in your date table.  The x-axis would then be from the date (or month, or year, etc.) column in the date table, not from your fact table.

View solution in original post


All Replies
Highlighted
tjd Established Member
Established Member
Posts: 202
Registered: ‎02-02-2016

Re: Continuous x-axis issue

In order to properly show dates as "continuous" data, you need to be using dates from a date table, not your non-continuous fact table (that's categorical and why it is showing correctly as categorical).  After building the data table, you link your fact table dates to the date column in your date table.  The x-axis would then be from the date (or month, or year, etc.) column in the date table, not from your fact table.

Community Support Team
Posts: 7,619
Registered: ‎05-02-2017

Re: Continuous x-axis issue

@KWB

 

Hi,

 

@tjd is quite right. Your data in column “Period” is non-continuous. You can reference this post here: https://community.powerbi.com/t5/Desktop/what-do-the-continuous-and-categorical-type-options-on-the-...

You can also reference this example here. The column “No.” is continuous.

Continuous x-axis issue .jpg

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  

Best Regards!

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Community Support Team
Posts: 7,619
Registered: ‎05-02-2017

Re: Continuous x-axis issue

@KWB

 

Hi,

 

Could you tell me if your problem is solved? You can mark the right answer to help others if it's convenient for you.

 

Best Regards!

Dale

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