Forum Discussion
svishwanathan
Helper III
8 years agoDAX for If with Filter
Hello I am trying to create a calculated column that returns a yes or no based on the following conditions. The max value in column A (LP Actuals'[Last Quantity Entered in past 15 days]) is 1...
- 8 years ago
I think this might be closer (and maybe easier to read)
New Ccolumn = VAR Col1 = CALCULATE(MAX('LP Actuals'[Last Quantity Entered in past 15 days]),'LP Actuals'[Job Code] = EARLIER('LP Actuals'[Job Code])) VAR Col2 = CALCULATE(MAX('LP Actuals'[Last Hours Entered in past 15 days]),'LP Actuals'[Job Code] = EARLIER('LP Actuals'[Job Code])) RETURN IF( Col1=1 && Col2=1 , --THEN-- "Yes", --ELSE-- "No" )
Phil_Seamark
Microsoft Employee
8 years ago
I think this might be closer (and maybe easier to read)
New Ccolumn =
VAR Col1 = CALCULATE(MAX('LP Actuals'[Last Quantity Entered in past 15 days]),'LP Actuals'[Job Code] = EARLIER('LP Actuals'[Job Code]))
VAR Col2 = CALCULATE(MAX('LP Actuals'[Last Hours Entered in past 15 days]),'LP Actuals'[Job Code] = EARLIER('LP Actuals'[Job Code]))
RETURN IF(
Col1=1 && Col2=1 ,
--THEN--
"Yes",
--ELSE--
"No"
)svishwanathan
Helper III
8 years agoThanks Phil
Works well
- svishwanathan8 years ago
Helper III
Phil
Thanks for your help. I am experiencing an unusal situation. If I add any calculated column, after the one you helped me to create it says A circular dependency was detected
Can you make a guess on what might be happening