Forum Discussion
Dynamic Reference line to indicate today's date
- 6 years ago
Hi, Anonymous
A vertical reference line is not available now.
To work around this requirement, you can try to use a combination chart.You can refer to this article:
And here is a sample I made:
You need to create a measure as below and add it to line and stacked column chart:
Line2 = VAR y = YEAR ( TODAY () ) VAR m = FORMAT ( TODAY (), "MMMM" ) VAR quar = FORMAT ( TODAY (), "q" ) VAR q = "Qtr " & quar VAR d = DAY ( TODAY () ) RETURN IF ( ISINSCOPE ( financials[Date].[Day] ), IF ( d IN FILTERS ( 'financials'[Date].[Day] ) && m IN FILTERS ( 'financials'[Date].[Month] ) && q IN FILTERS ( 'financials'[Date].[Quarter] ) && y IN FILTERS ( 'financials'[Date].[Year] ), 1, 0 ), IF ( ISINSCOPE ( financials[Date].[Month] ), IF ( m IN FILTERS ( 'financials'[Date].[Month] ) && q IN FILTERS ( 'financials'[Date].[Quarter] ) && y IN FILTERS ( 'financials'[Date].[Year] ), 1, 0 ), IF ( ISINSCOPE ( financials[Date].[Quarter] ), IF ( q IN FILTERS ( 'financials'[Date].[Quarter] ) && y IN FILTERS ( 'financials'[Date].[Year] ), 1, 0 ), IF ( ISINSCOPE ( financials[Date].[Year] ), IF ( y IN FILTERS ( 'financials'[Date].[Year] ), 1, 0 ) ) ) ) )Best Regards,
Community Support Team _ Eason
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, Anonymous
A vertical reference line is not available now.
To work around this requirement, you can try to use a combination chart.You can refer to this article:
And here is a sample I made:
You need to create a measure as below and add it to line and stacked column chart:
Line2 =
VAR y =
YEAR ( TODAY () )
VAR m =
FORMAT ( TODAY (), "MMMM" )
VAR quar =
FORMAT ( TODAY (), "q" )
VAR q = "Qtr " & quar
VAR d =
DAY ( TODAY () )
RETURN
IF (
ISINSCOPE ( financials[Date].[Day] ),
IF (
d IN FILTERS ( 'financials'[Date].[Day] )
&& m IN FILTERS ( 'financials'[Date].[Month] )
&& q IN FILTERS ( 'financials'[Date].[Quarter] )
&& y IN FILTERS ( 'financials'[Date].[Year] ),
1,
0
),
IF (
ISINSCOPE ( financials[Date].[Month] ),
IF (
m IN FILTERS ( 'financials'[Date].[Month] )
&& q IN FILTERS ( 'financials'[Date].[Quarter] )
&& y IN FILTERS ( 'financials'[Date].[Year] ),
1,
0
),
IF (
ISINSCOPE ( financials[Date].[Quarter] ),
IF (
q IN FILTERS ( 'financials'[Date].[Quarter] )
&& y IN FILTERS ( 'financials'[Date].[Year] ),
1,
0
),
IF (
ISINSCOPE ( financials[Date].[Year] ),
IF ( y IN FILTERS ( 'financials'[Date].[Year] ), 1, 0 )
)
)
)
)
Best Regards,
Community Support Team _ Eason
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.