If statement Blank()会在if()中导致错误-PowerApps

If statement Blank()会在if()中导致错误-PowerApps,if-statement,filter,powerapps,If Statement,Filter,Powerapps,我试图通过选择一个单选按钮从Dynamics 365中筛选一个表,该按钮将更新屏幕上的表 用户有三个选项可供选择:学校、企业、所有 当用户选择All时,它应该在Accounts表中查找,并在industrycode列中搜索空白值 下面是一个工作过滤器,它返回我想要的结果 Filter(Accounts,industrycode = Blank()) 但是,如果我添加一个if语句来确定用户从收音机中选择的值,我会得到一个错误,即“=”符号是无效的参数类型 Filter(Accounts,indu

我试图通过选择一个单选按钮从Dynamics 365中筛选一个表,该按钮将更新屏幕上的表

用户有三个选项可供选择:学校、企业、所有

当用户选择All时,它应该在Accounts表中查找,并在industrycode列中搜索空白值

下面是一个工作过滤器,它返回我想要的结果

Filter(Accounts,industrycode = Blank())
但是,如果我添加一个if语句来确定用户从收音机中选择的值,我会得到一个错误,即“=”符号是无效的参数类型

Filter(Accounts,industrycode = If("All" in radio_cust_type.Selected.Value,Blank()))
编辑:当我想要检查学校时,我使用一个过滤器,如:

Filter(Accounts,industrycode=If("School" in radio_cust_type.Selected.Value,34)) 
我打算稍后合并这两个过滤器,但现在我想检查空白

这应该可以:

If(
radio_cust_type.Selected.Value="All", Filter(Accounts, industrycode = Blank()),
radio_cust_type.Selected.Value="School", Filter(Accounts, industrycode = 34),
radio_cust_type.Selected.Value="Business", Filter(Accounts, industrycode = XX)
)

其中XX是企业的行业代码

如果用户选择学校或企业,您希望显示什么?industrycode在Dynamics 365中是一个整数,因此当用户选择学校时,结果将是34,其过滤器为“FilterAccounts,industrycode=IfSchool in radio_cust_type.Selected.Value,34”。但目前,商业代码在动态上是空白的