Forum Discussion
manojk_pbi
1 year agoHelper V
Help - Trend chart
Hi Friends, I have below data in model. How can we draw a line chart showing only Dec data of previous years and all months of the current year. MMMYY Forecast ActualCost 6/1/2023 31...
- 1 year ago
Hello manojk_pbi
One of the solutions would be to create one Calculated column in the table with below logic,
flag = VAR CurrentYear = YEAR(TODAY()) VAR RowYear = YEAR([MMMYY]) VAR RowMonth = MONTH([MMMYY]) RETURN IF( RowYear = CurrentYear, TRUE(), IF( RowYear < CurrentYear, RowMonth = 12, FALSE() ) )and use this flag column as a visual level filter as in below picture.
Hope this helps:)
- 1 year ago
Thanks for your reply. It is helpful. I am changing the graph to column chart in which we can avoid other months
MasonMA
1 year agoSuper User
Hello manojk_pbi
One of the solutions would be to create one Calculated column in the table with below logic,
flag =
VAR CurrentYear = YEAR(TODAY())
VAR RowYear = YEAR([MMMYY])
VAR RowMonth = MONTH([MMMYY])
RETURN
IF(
RowYear = CurrentYear,
TRUE(),
IF(
RowYear < CurrentYear,
RowMonth = 12,
FALSE() )
)
and use this flag column as a visual level filter as in below picture.
Hope this helps:)
manojk_pbi
1 year agoHelper V
Thanks for your reply. It is helpful. I am changing the graph to column chart in which we can avoid other months