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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply

Show data from today() and mark today() on graph

Hi, 
On the chart i need to display "ExmForTest" and "RevenueForecastM"  from today() not (as it is displayed) for whole current year. I also need to mark today() day on the graph somehowe, for example some vertical line on toyday() day  USING DAX. At the very end you can see the link of corresponding (.pbix) document.
CaptureQQ.PNG


https://drive.google.com/file/d/1gUnzTymn3DK2ip3DVXMvmio34yPhy_VF/view?usp=sharing

1 ACCEPTED SOLUTION
sturlaws
Resident Rockstar
Resident Rockstar

I must say, well done on the dax code for the forecasting measure, that is an impressive piece of DAX.

In order to get the measures to start from today, you can change this part

// ************************************************MONTH******************************************************************
       IF ( AND ( ISINSCOPE ( DateHelper[Date].[Month] ); NOT ( ISINSCOPE (  DateHelper[Date].[Day] ) ) );

to this

If(ISINSCOPE(DateHelper[Date].[Month]) && NOT(ISINSCOPE(DateHelper[Date].[Day] )) && SELECTEDVALUE(DateHelper[Date].[MonthNo])>=MONTH(TODAY());

 

 

When it comes to vertical lines, I am afraid that is not possible. There are some workarounds. It is possible to create line as a static shape. Or you can add markers as outlined here https://prathy.com/2018/05/adding-a-vertical-line-or-marker-to-a-chart-in-power-bi/. Neither of these options are optimal in my opinion. You can vote for ideas for improving, and perhaps Microsoft will implement it some day
https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/8083068-vertical-current-day-line...
https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/19550122-vertical-reference-lines...

View solution in original post

1 REPLY 1
sturlaws
Resident Rockstar
Resident Rockstar

I must say, well done on the dax code for the forecasting measure, that is an impressive piece of DAX.

In order to get the measures to start from today, you can change this part

// ************************************************MONTH******************************************************************
       IF ( AND ( ISINSCOPE ( DateHelper[Date].[Month] ); NOT ( ISINSCOPE (  DateHelper[Date].[Day] ) ) );

to this

If(ISINSCOPE(DateHelper[Date].[Month]) && NOT(ISINSCOPE(DateHelper[Date].[Day] )) && SELECTEDVALUE(DateHelper[Date].[MonthNo])>=MONTH(TODAY());

 

 

When it comes to vertical lines, I am afraid that is not possible. There are some workarounds. It is possible to create line as a static shape. Or you can add markers as outlined here https://prathy.com/2018/05/adding-a-vertical-line-or-marker-to-a-chart-in-power-bi/. Neither of these options are optimal in my opinion. You can vote for ideas for improving, and perhaps Microsoft will implement it some day
https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/8083068-vertical-current-day-line...
https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/19550122-vertical-reference-lines...

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.