Forum Discussion
YcnanPowerBI
2 years agoHelper II
Problem with adding IF statement
Hello. I am pretty new here so please forgive me if I post in the wrong place, etc. But onto my issue. I have a calculated column that assigns a time interval to each row. I now need it to look at an...
- 2 years ago
Hi, YcnanPowerBI
Try this updated code,
= Table.AddColumn(#"Changed Type", "Custom", each let actualTime = if [paidTime] = "" then [otherTime] else [paidTime] in Time.From(Text.From(Time.Hour(Time.From(actualTime)))&":"&(if Time.Minute(Time.From(actualTime)) >= 30 then "30" else "0")&":00") )
rubayatyasmin
2 years agoCommunity Champion
Hi, YcnanPowerBI
Try this updated code,
= Table.AddColumn(#"Changed Type", "Custom", each
let
actualTime = if [paidTime] = "" then [otherTime] else [paidTime]
in
Time.From(Text.From(Time.Hour(Time.From(actualTime)))&":"&(if Time.Minute(Time.From(actualTime)) >= 30 then "30" else "0")&":00")
)
- YcnanPowerBI2 years agoHelper II
It worked, thank you so much!