Forum Discussion
DYY94
3 years agoHelper I
Convert measure into a For loop with IF Condition
Hello Community, I want to to loop in this condition because it always gaves me '1' as a result. MR2 =
Var mr365 = [MR/365]
RETURN
IF ( mr365<1,1,mr365) This is [MR/365] it's Me...
amitchandak
3 years agoSuper User
DYY94 , Try if this can help
MR2 =
Var mr365 = [MR/365]
RETURN
Sumx(Values(Table[Maturire]) , IF ( mr365<1,1,mr365))
If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
- DYY943 years agoHelper I
Hi amitchandak ,
Thanks for your help.
the code works fine but when i used in other table it always gave me '1'.
it should return the real number from [MR2].
Here a simplifed file to understand the issue.
https://drive.google.com/file/d/1ZgsfLABoWKLXWfuh-A3SslgmZmAd0c40/view?usp=sharing
Thanks.