Forum Discussion
Power BI cannot apply operator & to numbers?
I just realized that I tried to add the formula in Query Editor while I guess I should have added them in the Data tables. They now work. But I just wonder how I can do it in Query Editor?
- ankitpatira10 years ago
Community Champion
jadewind If you want to do via query editor then similar output of can be achieved by using Conditional column. So in query editor under Add Column tab add conditional column.
- jadewind10 years ago
Advocate I
Thanks ankitmatira for your reply. I did try the conditional column but I can not perform the calculation. The "Output" will have to be either an entered value (text or number) or "Select a column" where I am not able to add "+1".
- v-ljerr-msft10 years ago
Microsoft Employee
But I just wonder how I can do it in Query Editor?
You can follow steps below to add this new column in Query Editor.
1. In Query Editor, Add Column tab, click Add Custom Column to add a custom column.
2. Then enter the column name and use the formula below to create the column.
if [Quarter] = 1 then Number.ToText([Year]-1) & "4" else Number.ToText([Year]) & Number.ToText([Quarter]-1)
Following is the result.
Regards