Forum Discussion

manojk_pbi's avatar
manojk_pbi
Helper V
1 year ago
Solved

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...
  • MasonMA's avatar
    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:) 

  • manojk_pbi's avatar
    manojk_pbi
    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