Forum Discussion
Anonymous
6 years agoNot applicable
Power BI IF statement
Please advise Example: Weekend = IF (IsWeekend =1, "Yes", "No") Problem: Unless I put my 1 in "" (Weekend = IF (IsWeekend ="1", "Yes", "No")), Power BI sees the entire statement as the log...
az38
Community Champion
6 years agoHi Anonymous
it's because of data type
if your column IsWeekend has the Number type you should compare it without quotas =1
If IsWeekend is a text type you should compare it with quotas ="1"
or try
Weekend = IF (VALUE(IsWeekend) =1, "Yes", "No")or
Weekend = IF (IsWeekend=VALUE("1"), "Yes", "No")
do not hesitate to give a kudo to useful posts and mark solutions as solution