Forum Discussion
bhmiller89
10 years agoHelper V
IF Statement - Power BI Desktop
I Have a column with values that are either 9 or 4. I need to make all of the 9s show as 8s but leave the 4s as is. I was playing with the "If[ScheduledDuration] = 9, "8",...." but don't know what to use for the "false" qualifer.
Any suggestions would be great.
It works great if I remove the "" from 8. Thanks for your help!
4 Replies
- NhallquistHelper V
Have you tried just using the result of the field? Like the statement below...
If[ScheduledDuration] = 9, "8", [ScheduledDuration])
- bhmiller89Helper V
I get the error "Expressions that yield variant data-type cannot be used to define calculated columns"
- bhmiller89Helper V
It works great if I remove the "" from 8. Thanks for your help!
- NhallquistHelper V
Cool!