Forum Discussion
rqh
2 years agoFrequent Visitor
Line Chart with Current Year and Prior Year values
Hi everyone! My line chart has two lines: one for current year sales (CY) and the other for prior year sales (PY). For the most recent year, CY records stop in May. I would like for the chart to n...
- 2 years ago
Hi,
Try this measure
PY net sales new = if([Net sales]=blank(),blank(),[net sales])
If this does not work, then share the download link of the PBI file.
gmsamborn
Super User
2 years agoHi rqh
You could use a measure like this to filter your visual.
_Include =
VAR _EndOfSales =
MAXX(
ALL( 'Sales'[Date] ),
'Sales'[Date]
)
VAR _EndOfMonth = EOMONTH( _EndOfSales, 0 )
VAR _Logic =
IF(
SELECTEDVALUE( 'Date'[Year] ) = BLANK(),
1,
IF(
MAX( 'Date'[Date] ) > _EndOfMonth,
0,
1
)
)
RETURN
_Logic
Let me know if you have any questions.