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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.