Create Filters based on some calculations

If you need to filter your data with a calculated value you can do it by creating a variable and then using it as a filter.

Lets say you have a section in which you want to talk about the best performing Region contributing to your sales.

This could keep changing period on period, so creating a static filter for any region might give you the wrong output.

To get this dynamic top region as a filter, you need to first create a variable calculating this value.

To first calculate the highest contributing region you can use the following formula:
Highest_region = ValueFromIndex(Keys(TopN(GroupByCategory(Region, Sales), 1)), 1)

This formula will give you the name of the highest contributing region.

You can now make this variable global by clicking on the globe button beside its name in the right panel.

Now when you create a new filter you can select the Region column and in the values section, instead of selecting a value present in the data, you can now select the variable you just created and save the filter.

You can now use this filter to create your section, and it will be completely dynamic. Whenever the data updates the section will automatically start reflecting your new top region.

Welcome to the Phrazor Community!!

Thank you for adding to the community.

The post captures the dynamic filter capabilities of Phrazor very nicely and new users should definitely give it a read.