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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
rishtinz
Helper I
Helper I

X-axis constant line on line chart

I have a line chart where I want to place a constant line on x-axis. I can do that when I have the date in x-axis field in Year-Month-Day hierarchy. As soon as i remove year from it I lose the constant line. I want to put the year in the legend instead. Has anyone been able to plot x-axis constant line on line chart with month-Day date hierarchy only?

 

rishtinz_0-1664913607250.png

 

1 ACCEPTED SOLUTION

@rishtinz You could create 2 measures, one that returns data only up to the milestone and one that returns data only after the milestone and thus have 2 different colored lines that appear contiguous.


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

5 REPLIES 5
Greg_Deckler
Super User
Super User

@rishtinz Create a Month Day column perhaps? Jan 1, Jan 2, Jan 3. Super odd that the x-axis constant line goes away when you take out Year from the hierarchy but stays if you leave Year in and take out Quarter. I tested this and it is indeed the case.


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
Arul
Super User
Super User

@rishtinz ,

could you share the screenshot of expected output?

Thanks,





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

Proud to be a Super User!


LinkedIn


Here's the output that I want. As you can see I have Year/Month/Day in the date hierarchy and so the x-axis constant works. I believe it works because its expecting a specific date and as soon as I remove year then the line disappears as well. 

 

Now that I am thinking, this might not works since the start of the term is never a fixed date but its usually the first monday of the first week of September. 

 

I wanted to plot a line to indicate a milestone (a date) for a year e.g. the blue line below is the milestone for this year. If I can't do this for multiple years then I guess I need to either label the marker with a different color or the line after the milestone.

 

rishtinz_0-1664921433989.png

 

I am having a similar issue.  In my case, I am using the x-axis constant to indicate "this week" and shade the past weeks along an x-axis with week numbers.  When I attempt to use a custom date hierarchy to facilitate year-weeknumber along the x-axis (i.e., to extend multiple years), this feature disappears from the analytics options. 

How did you ultimately solve your problem?

Any other suggestions from anyone else?

@rishtinz You could create 2 measures, one that returns data only up to the milestone and one that returns data only after the milestone and thus have 2 different colored lines that appear contiguous.


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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