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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
giroldoale
Helper I
Helper I

Time Axis do not limit

Hi,

i have a PBI model where I need to show a Line Chart having 2 measures over the Time.

Then in the table called Calendar 2, use to build a rolling calendar, I calculate a tag "YTD" to limit all the datas only to the ones from January to now.

The Idea is to select YTD in order to focus the line chart only in the period 01/01/2021 - 26/03/2021 (in caso of today).

The result I reached is that selecting YTD the measures stop to calculate up to 26/03/2021  but  the line charrt continue to show a line.

giroldoale_0-1616771455223.png

 

I'd like to have a x axis with time only for there 3 month or at less not have le constant line from 26/03/2021.

Going on, is it possible to have a dot line after the 26/03/2021?

 

1 ACCEPTED SOLUTION
v-robertq-msft
Community Support
Community Support

Hi, @giroldoale 

According to your description, I can understand your desription, I’ve also created some data to get your expected output, you can take a look my steps:

I created a measure in the data table like this:

Sum =
IF(
    SELECTEDVALUE('Table (2)'[YTD])="YTD",
    IF(
    MAX('Table'[Date1])<=TODAY(),
    SUM('Table'[Amount]),BLANK()),
    SUM('Table'[Amount]))

Then I created a line chart and two slicers and place them like this:

v-robertq-msft_0-1617003655196.png

 

Then I can the line chart automatically disappear the date from start of year to today if I selected “2021” in the date slicer.

If you want to get a dot line after the current day, you can go to the “Analytics” pane of the setting and add a forecast chart like this:

v-robertq-msft_1-1617003655204.png

 

And you can get what you want.

What’s more, you can also set the start and end date of your X-Axis manually here:

v-robertq-msft_2-1617003655206.png

For more detail, you can download my test pbix file here

 

If this result is not what you want, you can post some sample data(without sensitive data) and your expected result.

How to Get Your Question Answered Quickly 

 

Best Regards,

Community Support Team _Robert Qin

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

View solution in original post

2 REPLIES 2
v-robertq-msft
Community Support
Community Support

Hi, @giroldoale 

According to your description, I can understand your desription, I’ve also created some data to get your expected output, you can take a look my steps:

I created a measure in the data table like this:

Sum =
IF(
    SELECTEDVALUE('Table (2)'[YTD])="YTD",
    IF(
    MAX('Table'[Date1])<=TODAY(),
    SUM('Table'[Amount]),BLANK()),
    SUM('Table'[Amount]))

Then I created a line chart and two slicers and place them like this:

v-robertq-msft_0-1617003655196.png

 

Then I can the line chart automatically disappear the date from start of year to today if I selected “2021” in the date slicer.

If you want to get a dot line after the current day, you can go to the “Analytics” pane of the setting and add a forecast chart like this:

v-robertq-msft_1-1617003655204.png

 

And you can get what you want.

What’s more, you can also set the start and end date of your X-Axis manually here:

v-robertq-msft_2-1617003655206.png

For more detail, you can download my test pbix file here

 

If this result is not what you want, you can post some sample data(without sensitive data) and your expected result.

How to Get Your Question Answered Quickly 

 

Best Regards,

Community Support Team _Robert Qin

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

Jihwan_Kim
Super User
Super User

Hi, @giroldoale 

If it is OK with you, please share your sample pbix file, then I can try to come up with a desirable outcome.

 

- I think the constant line is because that you do not have value but YTD calculates until the end. In this case, you can limit this by inserting additional condition into the measure. Something like,

 

if (isblank(actualmeasure), blank(), YTDmeasure......)

 

Jihwan Kim

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


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.