Forum Discussion
Formula for Column Based on Filters
- Anonymous2 years ago
Hi AkameNoGamma
The currentdate is to get the value of the row separately but not the really current date.
Just like this:
Certainly the Slicer can not affect the table view, but what i used is the table visual in the report view.
At last, the calender date is created for your reference, you can create a new reference table.
If the above one can't help you, could you please provide more raw data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples? It would be helpful to find out the solution. You can refer the following links to share the required info:
How to provide sample data in the Power BI Forum
How to Get Your Question Answered Quickly
And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards
Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi AkameNoGamma
Please try this:
First of all, I create a set of sample:
the book2:
Book 1:
Then add a calender table as a reference.
The Book1 and Book2 should be linked as an one-to-one relationship:
Then add a measure:
CurrentDepartment =
VAR _currentDate =
MAX ( 'Table'[Date] )
RETURN
IF (
_currentDate < MAX ( 'book1'[Effective Start Date] ),
SELECTEDVALUE ( book1[Previous Department] ),
SELECTEDVALUE ( book1[New Department] )
)
Create a table and a slicer:
The result is as follow:
If the above one can't help you, could you please provide more raw data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples? It would be helpful to find out the solution. You can refer the following links to share the required info:
How to provide sample data in the Power BI Forum
How to Get Your Question Answered Quickly
And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards
Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you for replying to my post. I dont think "current" date will work as i need the column to reflect the new or previous department based on my slicers. and while researching, it seems that the slicers that i have will not affect the table view
- AkameNoGamma2 years agoHelper I
and to add, i'm actually looking for a formula that dynamically changed regardless of the year and month slicers that i selected.
- Anonymous2 years agoNot applicable
Hi AkameNoGamma
The currentdate is to get the value of the row separately but not the really current date.
Just like this:
Certainly the Slicer can not affect the table view, but what i used is the table visual in the report view.
At last, the calender date is created for your reference, you can create a new reference table.
If the above one can't help you, could you please provide more raw data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples? It would be helpful to find out the solution. You can refer the following links to share the required info:
How to provide sample data in the Power BI Forum
How to Get Your Question Answered Quickly
And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards
Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.