Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
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:
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:
In case it's needed, the test data is:
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
Solved! Go to Solution.
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.
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
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.
Best Regards!
Dale
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.
Hi @tjd ,
How do I link my fact table dates to the date column? I'm having the same issue, but I created a custom Week column, which I'd like to use as my x-axis. Since it's a custom column, it is being stored as a Text data type rather than a Date data type.
Here is the formula for my custom Week column:
Your Fact-table date column should be set up as Date type. Your custom week should be set up in your calendar. You then link your Calendar-Date column to your Fact-table date column (in relationships). When creating an x-axis, you should use the date values from your Calendar table, not your Fact-table. It will then be continuous across all dates.
User | Count |
---|---|
131 | |
108 | |
101 | |
67 | |
64 |
User | Count |
---|---|
137 | |
115 | |
102 | |
71 | |
61 |