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

HR Dashboard filtered by date

Hi,

 

I'm buidling a dashboard and getting the data from an incremental data base. the logic of what i want to do is I want to select a day from a date slicer, and i want to filter the [LastInserted] to match the date from the slicer.

 

the way the data base is set up is that daily they dump a copy of the current info of all employees, and they date stamp.

 

i have tried to use the countrows function to pair it with the date slicer but i haven't had any luck. Any thoughts?

1 ACCEPTED SOLUTION
v-shex-msft
Community Support
Community Support

HI @Anonymous ,

I'd like to suggest you create a date dimension table to link other table DateTime stamps based on the date field. Then you can use the calendar date to create a slicer with 'relative' mode to simply filter 'last n' date period records.

Use a relative date slicer and filter in Power BI Desktop 

BTW, you can also consider creating a dynamic date filter on the query editor side baed on local DateTime, it will auto filte specific date range based on current date.

Power Query Current Date Filter 
Regards,

Xiaoxin Sheng

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

View solution in original post

2 REPLIES 2
v-shex-msft
Community Support
Community Support

HI @Anonymous ,

I'd like to suggest you create a date dimension table to link other table DateTime stamps based on the date field. Then you can use the calendar date to create a slicer with 'relative' mode to simply filter 'last n' date period records.

Use a relative date slicer and filter in Power BI Desktop 

BTW, you can also consider creating a dynamic date filter on the query editor side baed on local DateTime, it will auto filte specific date range based on current date.

Power Query Current Date Filter 
Regards,

Xiaoxin Sheng

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

Hi @Anonymous ,

 

 

To find the latest date you can use the DAX formula LASTDATE: https://docs.microsoft.com/en-us/dax/lastdate-function-dax 

That should allow you to take the last date filtered with your slicer, and use this date to filter your table.

 

Does this help you?

If not, can you share a sample copy of your Power BI file? You can share it using One Drive, Google Drive or a similar tool.

 

Regards,

 

LC

Interested in Power BI and DAX templates? Check out my blog at www.finance-bi.com

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.