'Apply IF based on filter application in Tableau

Depending on the selection of the filter, that is, when you select a value, this formula should be displayed:

IF { FIXED [Product Id],[Period],[Month] : sum([Total Unit])

enter image description here

but when I select all the values of my filter, I want to apply this formula:

IF { FIXED [Product Id],[Period] : sum([Total Unit])

enter image description here

You will notice that I am not considering the dimension of Month in the latter case. I will appreciate your support.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source