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.
Daniel29195
Community Champion
2 years agocreate a calcuated column inside dimdate table that will return 1 or 0 base on this condition :
new column =
var max_date = max(table_name[date]) -- table_name = the fact table on which your calculations are based, such -- as net sales, gross sales ,...
RETURN
switch(
true(),
dimdate[date] <=max_date , 1, 0 )
after you finish this column,
put it in the filter pane on page level , and choose advanced filtering :
is = 1
this should fix your problem .
let me know if this would help .
best regards