Forum Discussion
Adding a dynamic date filter for Gantt Chart
Hi WanqiYao ,
Calculated columns are columns that are added to an existing table in a Power BI data model. It is calculated during the data loading phase and the value is stored in the Power BI model. The formula for a calculated column is calculated for each row in the table. Will not be affected by Slicer.
Measures are calculations created using DAX (Data Analysis Expressions) that are performed dynamically when interacting with a report in Power BI. Measures are used in visuals, PivotTables, and PivotCharts. Unlike calculated columns, calculations are not precalculated. Will be affected by Slicer.
For more information about the difference between measure and calculated columns, please refer to the following document:
Calculated Columns and Measures in DAX - SQLBI
Difference Between Calculated Column and Measure in Power BI - SPGuides
In the example you gave, just replace the StartDate of the Schedule table with measure with the same syntax.
The visual effect is as follows:
pbix file is attached.
If you have any further questions please feel free to contact me.
Best Regards,
Yang
Community Support Team
If 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!
Hi Yang,
Thank you for clarifying the reason for the error. I understand that this works, however I am undable to understand how to achieve the filter based on the start date and the end date. My original plan was to use an additional column to return 1 if the plan dates include the selected date and 0 vice-versa, then I can use this column to as a filter for the page. As you suggested this doesn't quite work,
Please let me know if you have any hints or suggestions you can share with me.
Regards,
Wanqi Yao