Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Auto-Filter Tables Based on Date in Column

I am still relatively new to Power BI, so please forgive me if this is a simple question; I have been looking for a solution for days and haven't been able to find an answer. This is also my first time posting, so please tell me if I am posting in the wrong place.

 

 

I have created a report in Power BI that combines two reports for employee Corrective Action and Leaves of Absence. Any corrective action must be extended by the number of days an employee is on a Leave. 

 

The goal of my report is to quickly visualize all employees who are on corrective action and have been on a Leave of Absence since the date that Corrective Action started. Below is a screenshot of my sample report currenly,

 

Currently, I am using the "Team Member" slicer to look at each individual employee and the date slicer in order to filter leave of absence dates to only show those dates AFTER the employee was placed on Corrective Action OR if there is a date in the "Reopened Date" field, I am filtering the date slicer to after that date. The Leave of Absence report contains dates prior to the corrective action due to how the system that the report is pulled from works. 

 

What I would like to do is eliminate the need for the date slicer. I would like the report to automatically filter the Leaves of Absence to after the date the corrective action started. Ideally, I would also like it to check if there is a date in the "Reopened Date" column and, if so, filter to after that date instead. Below is a screenshot of my relationships: 

 

Please let me know if there is additional information I should include, this is my first time posting on the forum. 

 

  • Hi Anonymous ,

     

    You can modify the paycode at underlined section and create a new measure.

    I have modified the demo, please try it:demo.pbix

     

    Best Regards,

    Link

22 Replies

  • Anonymous ,Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

    • Anonymous's avatar
      Anonymous
      Not applicable

      I don't have either online anywhere, is there a way I can upload from a local file?

      • amitchandak's avatar
        amitchandak
        Super User

        Anonymous , You can upload to one drive or dropbox and share a link

  • v-xulin-mstf's avatar
    v-xulin-mstf
    Community Support

    Hi, Anonymous 

    I have no access to the link, please provide a public link.

    I suggest you to use One Drive for Business.

    Best Regards,

    Link

      • v-xulin-mstf's avatar
        v-xulin-mstf
        Community Support

        Hi, Anonymous 

        I'm not clear your expected outcome, please details.
        For example, you want to get the count of days that Mosby, Ted leave of absence, and the date must between date started and date ended.
        In addition, i'm not clear the reopened date mean, please details.

        Best Regards,

        Link