Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

How to make this filter?

I have a table, the time column is a period of a week.

So we have the time column like

period 1-week 1,...

 

How to make the corresponding filter like:

period and week

-----------------------------------------------

|period 1-week 1: 1/1/2023-1/7/2023         |

|period 1-week 2:  1/8/2023-1/14/2023      |

|period 1-week 3:  1/15/2023-1/21/2023    |

|period 1-week 4: 1/22/2023-1/28/2023     |

|period 2-week 5: 1/29/2023-2/4/2023       |

|..............................................................                   |

 

 

 

period number actually is the number of month.

 

How to make this filter?

 

  • Hello,

     

    You can create a calculated column with that kind of formula : 

    Custom Filter = 'YourTable'[period] & "-week " & 'YourTable'[week] & ": " & 
    FORMAT(STARTOFMONTH('YourTable'[Date]), "M/d/yyyy") & " - " & FORMAT(ENDOFMONTH('YourTable'[Date]), "M/d/yyyy")

     

    Then use it to filter your data.

     

    Hope it helps.

     

    Igna

2 Replies

  • Igna's avatar
    Igna
    Resolver III

    Hello,

     

    You can create a calculated column with that kind of formula : 

    Custom Filter = 'YourTable'[period] & "-week " & 'YourTable'[week] & ": " & 
    FORMAT(STARTOFMONTH('YourTable'[Date]), "M/d/yyyy") & " - " & FORMAT(ENDOFMONTH('YourTable'[Date]), "M/d/yyyy")

     

    Then use it to filter your data.

     

    Hope it helps.

     

    Igna