Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/powerbi/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Excel formula 为什么Power Query在这里查找逗号?_Excel Formula_Powerbi_Powerquery_M - Fatal编程技术网

Excel formula 为什么Power Query在这里查找逗号?

Excel formula 为什么Power Query在这里查找逗号?,excel-formula,powerbi,powerquery,m,Excel Formula,Powerbi,Powerquery,M,我有一段代码: let Yearpop=0, 年死亡率=0 如果#“添加索引”[#“国家年”]{[index]}= #“增加索引”[#“国家年”]{[索引]+1} 然后Yeardeath=Yeardeath+[死亡人数], Yearpop=Yearpop+[总人口] 其他(年死亡*100000)/Yearpop, 年死亡率=0, Yearpop=0简单的答案是:因为语法错误 请看下面的示例,它的语法也错误,无法正常工作 let Yearpop=0, Yeardeat

我有一段代码:

let
Yearpop=0,
年死亡率=0
如果#“添加索引”[#“国家年”]{[index]}=
#“增加索引”[#“国家年”]{[索引]+1}
然后Yeardeath=Yeardeath+[死亡人数],
Yearpop=Yearpop+[总人口]
其他(年死亡*100000)/Yearpop,
年死亡率=0,

Yearpop=0
简单的答案是:因为语法错误

请看下面的示例,它的语法也错误,无法正常工作

let    
   Yearpop=0,    
   Yeardeath=0,    
   if Yeardeath = 1 then result = 1 else result = 0
 in 
    result
您必须使用


进一步阅读

根本不清楚你想做什么,如果你添加一些屏幕截图和/或虚拟数据,显示你拥有什么和你想要什么,这将使事情变得更容易。这里存在多个问题。你可能应该退后一步,先解释一下你想做什么,因为M的工作方式与你试图使用它的方式不同。
let    
   Yearpop=0,    
   Yeardeath=0,    
   result = if Yeardeath = 1 then 1 else 0  
 in 
    result