Forum Discussion
Store "IF" condition in variable
Anonymous , Just make sure it returns true or false
like
IF(kondisi = 1,
if('Table'[Population 1] <> BLANK(),true(), false())
if('Table'[Population 2] <> BLANK(),true(), false())
)
it does not return true or false, but it is returned as a condition inside the variable calculate_result
it is returned as it was like below :
Var Calculate_Result =
CALCULATE(
COUNT('Table'[primkey]),
KEEPFILTERS(
'Table'[client_name] = "Superman"
&& IF(kondisi = 1,
'Table'[Population 1] <> BLANK(),
'Table'[Population 2] <> BLANK()
)
)
)
- Anonymous4 years agoNot applicable
Hi Anonymous ,
I'm not quite sure what you want... According to the formula you provided, the result returned by the variable Calculate_Result should be a numeric value: the number of primkeys. And the formula syntax of the variable Calculate_Result is also correct. Could you please provide a simple sample data and the final result you want? Maybe we can implement your requirement in some other way later. Thank you.
Best Regards