Forum Discussion
Filter fiscal year data based on two date columns
Hello all,
In Table 1, there are two date fields(one is start and expiration date) and one ID field.
I have a other table with calender date, month, year, fiscal year columns.
I need to create a filter, based on selection of fiscal year , it should show ID's which are in the range of start and expiration date.
Is there a way or any alternate way. Please suggest me.
- Anonymous2 years ago
Hi Krishna09 ,
You can simply add it to the visual's filter and set the condition equal to 1.Best Regards,
Gao
Community Support Team
5 Replies
- amitchandak
Super User
Krishna09 , I think smimilar to HR Analytics
Power BI: HR Analytics - Employees as on Date : https://youtu.be/e6Y-l_JtCq4
https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-trend/ba-p/882970
Power BI HR Active Employee Tenure Bucketing, and Hired, Terminated, and Active employees: https://youtu.be/fvgcx8QLqZU - AnonymousNot applicable
Hi Krishna09 ,
You will need an unconnected fiscal table with a start date and end date for a fiscal year:Then create a measure like:
Measure = VAR _start_date = MAX('FYCalendar'[StartDate]) VAR _end_date = MAX('FYCalendar'[EndDate]) VAR _result = IF(ISBLANK(SELECTEDVALUE('FYCalendar'[FiscalYear]))||(_start_date>=MAX('Table'[Start Date]) && _end_date<=MAX('Table'[Expiration Date])),1) RETURN _resultAnd the output:
Best Regards,
Gao
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
- Krishna09
Helper III
Anonymous , amitchandak ,
Thank you both.
is it possible to show only the row based on ID, with out measure count in the table?
- AnonymousNot applicable
Hi Krishna09 ,
You can simply add it to the visual's filter and set the condition equal to 1.Best Regards,
Gao
Community Support Team