Filter and Calculate

Hi,

In the video below you mention best to use Filter function in the Calculate function. Why is that when the calculate function has an implied filter. What are the benefits of using the filter function in the calculate function.

Thanks in advance.
Elizabeth

@ElizabethTachjian,

I think you’ll find this helpful in answering your question:

  • Brian

@ElizabethTachjian

  • The FILTER function allows iterating through rows of any table.
  • Can use AND and OR functions.
  • Can nest one filter within another.
  • Can perform things CALCULATE can’t (as per my examples in the attached pbix file).

In the attached pbix file I provide 2 separate examples named Ex 1 and Ex 2. The 2 measures that show an error are intended to demonstrate what you can’t do with CALCULATE on its own vs what you can do using CALCULATE and the FILTER function together.

eDNA_Calculate_vs_Filter_v2.zip (1.1 MB)

1 Like

Hi @ElizabethTachjian, we’ve noticed that no response has been received from you since the 17th of March. We just want to check if you still need further help with this post? In case there won’t be any activity on it in the next few days, we’ll be tagging this post as Solved. If you have a follow question or concern related to this topic, please remove the Solution tag first by clicking the three dots beside Reply and then untick the checkbox. Thanks!

Hi @ElizabethTachjian, you may also want to check this video where Sam talked about https://forum.enterprisedna.co/t/simple-and-advanced-filters-with-calculate-using-filter-function/4924. You might get additional tips here.

Thank you that makes sense.

Thank you. Will do .