Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
9 years ago
Solved

Auto select previous months

Hi guys,   I want to know if it is possible select one month, and the others selected automatically, like a MTD (I suppose). I have an alternative, using quarters checkbox, but, what i really want ...
  • Vvelarde's avatar
    9 years ago

    Anonymous

     

    Try this:

     

    Create a table with Months (1....12) Use this as Slicer. Don't related with your data table.

     

    Create a Measure: 

     

    ValuesChart =
    VAR MAXMONTH =
        VALUES ( Months[Month] )
    RETURN
        IF (
            VALUES ( Table1[Month] ) <= MAXMONTH,
            CALCULATE ( SUM ( Table1[Values] ) ),
            BLANK ()
        )

    Use this measure in your chart.