Hello
I'm trying to create a logical function mixing "IFs" from two dimensions with no success.
I want to calculate the expected harvest of a vineyard that depending on two categories: the grape color (red or white) and the last year of rental agreement.
I have an account-dimension with the "Year of agreement" as a measure
and a generic-dimension with a grape color as an attribute
The two "IFs" functions work perfectly separately. However when I try to combine them, I get validation errors like: "The operator 'AND' can not be used in an IF function"
this is the script of the two separate IFs:
IF ( RESULTLOOKUP([d/account]="AGGRMNT_YEAR") - RESULTLOOKUP([d/Date]=%Current_Year%)) >0
IF [d/VINEYARD].[p/Color]="RED"
Can you please help me to use both of them as a condition for my data action?
Thanks for helping!
PS: attached one of my unsuccessful trial out of many