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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
JB0007
Frequent Visitor

Table is not filtering on Dates

Hi Power BI community,

 

I have created a manual date table using the DAX formula:

Dates = 
ADDCOLUMNS(
    CALENDARAUTO(),
    "Year",YEAR([Date]),
    "Quarter No", QUARTER([Date]),
    "Quarter", "Q"&QUARTER([Date]),
    "Month No",MONTH([Date]),
    "Month",FORMAT([Date], "MMM"),
    "Day",DAY([Date]),
    "Date_Full",DATE(YEAR([Date]),MONTH([Date]),DAY([Date]))
)

 

I have imported a table from SharePoint were other dates are present.

I want to filter the SharePoint list based on the date selected in the custom table, but I am not having any result:

 

JB0007_0-1643721276124.png

 

Can someone please help me,

 

Any help will be much appreciated.

1 ACCEPTED SOLUTION

Hi @JB0007 ,

 

Firstly, you could change the second table to slicer visual.

https://docs.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-slicers 

Secondly, the [start date] in the first table is datetime type so it will not It is not equal to the date selected in the second table -- 8:00 am <> 12:00 am. I suggest you to change them to date type for comparison.

At last, you could create a measure to rank the [start date]. Set the selected date as 0 and sort dates order by measure.

_start = SELECTEDVALUE(Table1[start date])

rank_ = IF(SELECTEDVALUE(Table1[start date])=SELECTEDVALUE(Table2[date]),0,RANKX(all(Table1),[_start],,ASC))

2.PNG

 

Best Regards,

Jay

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@ , Not able to join dots. Can you explain what is needed and the logic behind that?

see if this can help

https://community.powerbi.com/t5/Community-Blog/How-to-divide-distribute-values-between-start-date-o...

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Hi @amitchandak , thank you for your feedback.

 

I have removed the EndDate column because it is irrelevant.

But lets say, I want to filter the first table based on the date selected from the second table.

I can use the dates from the same table (first table) but I cannot customize the date as I wanted e.x.
I want to set Today as the first date in the table and then sort by in descending order.

I can only achieve this using a Custom Date Table (which is the second table).
However, when a select for example 25 Feb, it is not filtering the table.

 

JB0007_0-1643724914574.png

 

Hi @JB0007 ,

 

Firstly, you could change the second table to slicer visual.

https://docs.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-slicers 

Secondly, the [start date] in the first table is datetime type so it will not It is not equal to the date selected in the second table -- 8:00 am <> 12:00 am. I suggest you to change them to date type for comparison.

At last, you could create a measure to rank the [start date]. Set the selected date as 0 and sort dates order by measure.

_start = SELECTEDVALUE(Table1[start date])

rank_ = IF(SELECTEDVALUE(Table1[start date])=SELECTEDVALUE(Table2[date]),0,RANKX(all(Table1),[_start],,ASC))

2.PNG

 

Best Regards,

Jay

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.

Helpful resources

Announcements
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

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