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
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
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.