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
twiggem
Frequent Visitor

X-Axis Titles Misaligned When using Continuous X-Axis, but need to for "Today" reference line

Hi!

Returning user to PBI, but dont recall this issue before. I have a a line chart, with a continuous date from a date table and am pulling through measures, but the date on the x-axis is misaligned with the values displayed. What am I doing wrong?

 

twiggem_0-1697028230362.png

The Value 20 is correct for Dec 2022, but the point is on the Jan 2023 line of the X-Axis.

 

There is no relationship between the date table and fact

 

 

Active Contractors = 
VAR StartersAcc = Calculate('Master People List'[ID Count], FILTER('Master People List',[Start Date]<=Max('Date Table'[Date]) && 'Master People List'[Employment Group] = "Contractor"))
VAR LeaversAcc = Calculate('Master People List'[ID Count], FILTER('Master People List',[Finish Date]<>BLANK() && [Finish Date]<=Max('Date Table'[Date]) && 'Master People List'[Employment Group] = "Contractor"))
RETURN StartersAcc-LeaversAcc

 

 

It works ok when chosing a categorical x-axis, but then I lose the functionality for "Today"

Thanks for your help!

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @twiggem ,

 

Believe that this is a problem of the date vs axis meaning that if the date value is to close to the end of the month appears to be in January, if you notice the line that references that point of data is right next to the dotted line that marks  the January month.

 

I understand that visually apears to be on January but is not.


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

3 REPLIES 3
MFelix
Super User
Super User

Hi @twiggem ,

 

Believe that this is a problem of the date vs axis meaning that if the date value is to close to the end of the month appears to be in January, if you notice the line that references that point of data is right next to the dotted line that marks  the January month.

 

I understand that visually apears to be on January but is not.


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



Great inspo @MFelix I created an adjusted date, put that in the X-Axis, the calculations are still working on the actual date. From the measure earlier.

 

Adj Date = 'Date Table'[Date] - 27

 

and now it is displaying more correctly

twiggem_0-1697098420951.png

Thanks!

Thanks @MF you are correct, because I am using end of month to calculate headcount. So it is a choice basically between categorical and no today reference 😞

ah... or creating a fake date in my date table, to shift it along, let me try that. Thank you!

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.