Forum Discussion
Two Calculated Columns with the same formulas are returning different results
- Anonymous4 years ago
Hi Anonymous ,
-
If there is a relationship between the result and search tables, in most cases, using RELATED function instead of LOOKUPVALUE is more efficient and provides better performance.
-
The search_value and alternateResult parameters are evaluated before the function iterates through the rows of the search table.
-
Avoid using ISERROR or IFERROR functions to capture an error returned by LOOKUPVALUE. If some inputs to the function will result in an error when a single output value cannot be determined, providing an alternateResult parameter is the most reliable and highest performing way to handle the error.
You could try below formula:
CurrentWeek = calculate(max(DateTable[ISCURRENTWEEK]),filter(DateTable,DateTable[WeekOfYearKey]=FactTable[WeekOfYearKey]))
Best Regards,
Jay
-
Hi Anonymous ,
-
If there is a relationship between the result and search tables, in most cases, using RELATED function instead of LOOKUPVALUE is more efficient and provides better performance.
-
The search_value and alternateResult parameters are evaluated before the function iterates through the rows of the search table.
-
Avoid using ISERROR or IFERROR functions to capture an error returned by LOOKUPVALUE. If some inputs to the function will result in an error when a single output value cannot be determined, providing an alternateResult parameter is the most reliable and highest performing way to handle the error.
You could try below formula:
CurrentWeek = calculate(max(DateTable[ISCURRENTWEEK]),filter(DateTable,DateTable[WeekOfYearKey]=FactTable[WeekOfYearKey]))
Best Regards,
Jay