Forum Discussion

KendallBrown13's avatar
KendallBrown13
Frequent Visitor
4 years ago
Solved

Time Intelligence

I have a unique issue that I'm hopeful someone on this forum can help me answer.    Here is an image of my dashboard.  Here is the issue at hand - when I filter the Year slicer in the top le...
  • v-yanjiang-msft's avatar
    4 years ago

    Hi KendallBrown13 ,

    There're two possible reasons why the previous year value disappear, first maybe it return blank, which because of there's no value in the previous year in the sample or a incorrect formula, second maybe the previous year value and the current year value coincide. You can convert the chart to a table visual to see the specific value.

    Additionally, the MonthYear column in your sample is already a date format and does not need to add .[Date] after it in the formula.

    I create a sample and here's my solution.

    Pre =
    CALCULATE (
        SUM ( 'Table'[Sales] ),
        FILTER (
            ALL ( 'Table' ),
            'Table'[MonthYear]
                = DATE ( YEAR ( SELECTEDVALUE ( 'Table'[MonthYear] ) ) - 1, MONTH ( MAX ( 'Table'[MonthYear] ) ), DAY ( MAX ( 'Table'[MonthYear] ) ) )
        )
    )
    

    It get correct result in my sample.

     

     

    Best Regards,
    Community Support Team _ kalyj

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.