'Why Am I getting Token Comma Expected in an If then else power query statement
I have this statement and according to all I've seen there shouldn't be a comma anywhere in the statement but for some reason I keep getting Token Comma Expected error and if I put a comma it raises other errors:
= if [Fiscal Month Year] = "2021-06" then CALCULATE(SUM([Beg. Inventory CS]+CALCULATE(SUM([SAP Plan CS])-CALCULATE(SUM([Forecast CS])))) else CALCULATE(SUM([SAP Plan CS])-CALCULATE(SUM([Forecast CS])))
Solution 1:[1]
I found that there is a difference between If and if, if you use "if" then you will need to use then/else, but if you use "If" it works as in Excel. Ex. If(logical validation, true, false)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | MongeCR |