Forum Discussion
JamesMarquezDev
5 years agoFrequent Visitor
Variable Date from Measure Not Working in Filter Function
Why does hardcoding a date in the filter function result in a correctly filtered table: Filtered Table =
FILTER (
table,
table[date_column] >= DATE(2021,5,1)
) However, u...
m3tr01d
5 years agoContinued Contributor
JamesMarquezDev
Your "Filtered_Table", is it a calculated table?
JamesMarquezDev
5 years agoFrequent Visitor
I'm using the FILTER function, but I did also try the CALCULATETABLE function which resulted in the same effect. The logic of my code and expression works fine when the date is hard coded. It just seems as though when using a variable to find a particular date, Power BI is running the FILTER function before assigning the date to the variable. In a normal programming project, I would use some print functions to identify what exactly is occuring while the function is running. Unfortunately I can't troubleshoot this problem in Power BI.