Forum Discussion

bilingual's avatar
bilingual
Icon for Helper V rankHelper V
6 years ago
Solved

Filter for full months

Hi , i  have a a query where i am importing data every monday, but for a lot of the visuals , they must only be updated when the month has ended and all data is available.

For example now i have a graph which shows data for September but only for the first 6 days.

 

 

I can off course remove September manually by filter , but is there a way to create a filter so only the full months  are shown?

 

  • bilingual , Not very clear.

     

    You can have a column in the date table like

    Month Type = Switch( True(),
    Date[Date] = eomonth(Today(),0) && eomonth(Date([Date],0)= eomonth(Today(),0) ,"Current Month" , //Last Month
    Date[Date] <> eomonth(Today(),0) && eomonth(Date([Date],0)= eomonth(Today(),-1) && ,"Current Month" , //This Month
    [Month Year]
    )

     

    and Use current month as filter

3 Replies

  • bilingual , Not very clear.

     

    You can have a column in the date table like

    Month Type = Switch( True(),
    Date[Date] = eomonth(Today(),0) && eomonth(Date([Date],0)= eomonth(Today(),0) ,"Current Month" , //Last Month
    Date[Date] <> eomonth(Today(),0) && eomonth(Date([Date],0)= eomonth(Today(),-1) && ,"Current Month" , //This Month
    [Month Year]
    )

     

    and Use current month as filter

    • bilingual's avatar
      bilingual
      Icon for Helper V rankHelper V

      Hi Amit, unfortunately it does not work, as the Current Month is only active for one of the days in the month, not all days 😞

      Current month = Switch( True();
      Calendar[Date] = eomonth(Today();0) && eomonth(Calendar];0)= eomonth(Today();0) ;" Current month"
      Calendar[Date] = eomonth(Today();0) && eomonth(Calendar];0)= eomonth(Today();-1) ;" Current month"
      [MÃ¥ned_Ã¥r]
      )

      My example:

      DateCurrent month formulaMÃ¥ned_Ã¥r
      28-09-2020Current month sep-20
      21-09-2020sep-20 sep-20
      07-09-2020sep-20 sep-20
      08-09-2020 sep-20 sep-20
      31-08-2020 sep-20 sep-20