Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

how to add date range filter

Hi,

 

i have table has start date/time and end date/time filed. now i want to give date range filter to user so user can select start date and end date based on that data get filter.

 

pls guide how to add date range filter.

Thx

1 ACCEPTED SOLUTION

Hi,

 

I answered a question similar to this yesterday.  You may download my PBI file from here.

 

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

5 REPLIES 5
Ashish_Mathur
Super User
Super User

Hi,

 

Can the time stamps be removed or do you need them?


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

time stamp can be removed, i  just need to filter based on date.

Hi,

 

I answered a question similar to this yesterday.  You may download my PBI file from here.

 

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
v-shex-msft
Community Support
Community Support

HI @Anonymous,

 

Power bi not support direct operation on date range which define by two columns.

 

You need to create a calculated table to store expand detail date and link to original table, then you simply use new data column as source of slicer to filter on date range.

 

Sample table formula:

Expand date table =
VAR _calendar =
    CALENDAR ( MIN ( Table[start] ), MAX ( Table[end] ) )
RETURN
    SELECTCOLUMNS (
        FILTER (
            CROSSJOIN ( Table, _calendar ),
            Table[start] <= [Date]
                && Table[end] >= [Date]
        ),
        "id", Table[unique ID],
        "Date", [Date]
    )

 

Build relationship based on 'id' column, then use new date column to create slicer to filter on original table.

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Hi @v-shex-msft ,

 

I see your post when I searched in the forum and your answer may help me.

I want to apply filters from several columns(Project+Version+CyleName).

Please see my shared excel. https://1drv.ms/x/s!AsM9bO8zGUN6qnGmCaFm-w7WgYYL

 

add here is my original post.

https://community.powerbi.com/t5/Desktop/How-to-create-several-filters-which-should-applyed-several/...

 

Could you please help to have a look and give your suggestion? Thank you very much!

 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.