【发布时间】:2020-03-26 07:52:59
【问题描述】:
我有以下两难选择……
数据在 SQL 中存储为 BIT 即 1 或 0。
我的工作表中的参数由用户定义,即是或否。
当参数检查时,它显然是用下面的代码把它捡起来的:
let
//Pull in a values from the parameter table
SQL = fnGetParameter("SQL"),
dbName = fnGetParameter("DB"),
ValuationDate = Text.From(fnGetParameter("Valuation Date")),
ActiveItem = Text.From(fnGetParameter("Active Items")),
if ActiveItem = "No" then "1" else "0"
Source = Sql.Database(SQL, dbName,
[Query="
我面临的问题是,如何在高级编辑器中编写/开发以将 Yes / No 切换为 1 / 0?
我用下面的代码试了一下(上面也可以看到):
if ActiveItem = "No" then "1" else "0"
这可能吗?
【问题讨论】:
标签: excel powerquery sql-server-2017