Forum Discussion

StihinMS's avatar
StihinMS
New Member
8 years ago
Solved

Filtering day value by last month

Greetings, i have a table, wich shows sales for current month by DAYS, i need to filter it and show only products which were sold in previous MONTH, not in same day of previous month, but during full last month, is any way to solve it?

  • HI,@StihinMS

       You can add a column that products which were sold in previous MONTH

    Column = IF(CALCULATE(COUNTA(Table1[products ]),FILTER(Table1,Table1[Month]=EARLIER(Table1[Month])-1&&Table1[Year]=EARLIER(Table1[Year])&&Table1[products ]=EARLIER(Table1[products ])))>0,Table1[products ])

    Then darg this column into visuals level filters and filter (blank) like below:

    Result:

     

    Best Regards,

    Lin

1 Reply

  • v-lili6-msft's avatar
    v-lili6-msft
    Community Support

    HI,@StihinMS

       You can add a column that products which were sold in previous MONTH

    Column = IF(CALCULATE(COUNTA(Table1[products ]),FILTER(Table1,Table1[Month]=EARLIER(Table1[Month])-1&&Table1[Year]=EARLIER(Table1[Year])&&Table1[products ]=EARLIER(Table1[products ])))>0,Table1[products ])

    Then darg this column into visuals level filters and filter (blank) like below:

    Result:

     

    Best Regards,

    Lin