Forum Discussion

DigiS's avatar
DigiS
Frequent Visitor
9 years ago
Solved

formula and slicer to compose different data selections

Question: I want the slicer (which shows a button for each year) to show the last 13 months when no year is selected. And I want it to show all (and only) the transactions in a specific year when th...
  • v-caliao-msft's avatar
    9 years ago

    Hi DigiS,

     

    You can use two slicers to achieve this requirement, and broke the interactions between them.

    Create two column in your date table.
    Last13Month = IF(DATEDIFF(Sales[Date],TODAY(),MONTH)>12,"History Data","Last 13 Month")
    Year = YEAR(Sales[Date])

    Ceate two slicers visuals, add those two column into them. And broke the interactions between them.
    Select one slicer>Forma>Edit Interactions>None

    Please note that two slicer work as AND opeartor to filter data, before select items in slicer, please uncheck all items in other slicer.

     

    Regards,

    Charlie Liao