Forum Discussion
Measure not returning correct vale
I am trying to write a measure that will return "T" if the statement is true and "F" if it is false. The measure is supposed to look at a certain column to see if that value is true, but it is not working properly.
Example columns:
Task, Percent Complete, Finish Number
1, 100, -74
2, 100, -25
3, 95, 24
If I write the code
Filter =
Return(
Hi,
I didn't understand your logic but if you want the first row returns "F", try this (Calculated Column) :SWITCH( TRUE(), T_Task[PercentComplete]=100 && T_Task[FinishNumber] >=-30 ,"T", T_Task[PercentComplete]<100, "T", "F" )I hope this could help you.
- Anonymous2 years ago
Hi emilyh1 ,
Thank you emilyh1 for the quick response and solution. Here is the version of the measure I added:
Filter = SWITCH( TRUE(), MAX('T_Task'[Percent Complete])=100 && MAX('T_Task'[Finish Number]) >=-30 ,"T", MAX('T_Task'[Percent Complete])<100, "T", "F" )Then the result is as follows.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
2 Replies
- _AAndradeResident Rockstar
Hi,
I didn't understand your logic but if you want the first row returns "F", try this (Calculated Column) :SWITCH( TRUE(), T_Task[PercentComplete]=100 && T_Task[FinishNumber] >=-30 ,"T", T_Task[PercentComplete]<100, "T", "F" )I hope this could help you.
- AnonymousNot applicable
Hi emilyh1 ,
Thank you emilyh1 for the quick response and solution. Here is the version of the measure I added:
Filter = SWITCH( TRUE(), MAX('T_Task'[Percent Complete])=100 && MAX('T_Task'[Finish Number]) >=-30 ,"T", MAX('T_Task'[Percent Complete])<100, "T", "F" )Then the result is as follows.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.