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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
erhan_79
Post Prodigy
Post Prodigy

Filtering Dates On a table

Hi There ;

 

İ need your kind supports for to create table B as below , i have a table named "Table A" as below , i want to put a dynamic filtre as below ; 

 

  • For example today 03.01.2022 , system will show me a table which one's delivery date will start after 4 days from today and will include 4 days info , so if i am looking table today , system will show me between 07.01.2022 and 11.01.2022 infos , you can see my original table named "Table A" , and you can see the the table that i would like to create "Table B " which one filtered .

Thanks in advance for your kind supports 

 

Capture.JPG

 

1 ACCEPTED SOLUTION
Samarth_18
Community Champion
Community Champion

Hi @erhan_79 ,

 

You can create a measure with below code and use it as filter on your table visual:-

_filter =
VAR start_date =
    TODAY () + 4
VAR end_date =
    TODAY () + 8
RETURN
    IF (
        MAX ( 'Table (2)'[Delivery date] ) >= start_date
            && MAX ( 'Table (2)'[Delivery date] ) <= end_date,
        1,
        0
    )

Samarth_18_0-1641209417507.png

 

Thanks,

Samarth

 

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

View solution in original post

4 REPLIES 4
Samarth_18
Community Champion
Community Champion

Hi @erhan_79 ,

 

You can create a measure with below code and use it as filter on your table visual:-

_filter =
VAR start_date =
    TODAY () + 4
VAR end_date =
    TODAY () + 8
RETURN
    IF (
        MAX ( 'Table (2)'[Delivery date] ) >= start_date
            && MAX ( 'Table (2)'[Delivery date] ) <= end_date,
        1,
        0
    )

Samarth_18_0-1641209417507.png

 

Thanks,

Samarth

 

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

thank you very much @Samarth_18  , this is the  solution that i wanted ...

amitchandak
Super User
Super User

@erhan_79 , if you select a date and want to dates more than that then that selected date should come from an independent date table

 

//Date1 is independent Date table, Date is joined with Table
new measure =
var _max = maxx(allselected(Date1),Date1[Date]) +8
var _min = _max -4
return
calculate( sum(Table[Qty]), filter('Date', 'Date'[Date] >=_min && 'Date'[Date] <=_max))

 

Need of an Independent Date Table:https://www.youtube.com/watch?v=44fGGmg9fHI

@amitchandak  

thanks for your reply but , i dont want to calculate a sum , just imagine that in a table visual i show table A , but i want to create another visual table as Table B and i want to show only filtered dates and quantities.

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

Top Solution Authors