Forum Discussion
Summarising Two Fields into One
- 10 years ago
You could do this in the Query Editor or by adding a new column in the Data View. For the Query Editor:
From the main report view, go to the Home tab and click Edit Queries to get to the Query Editor. Find your query where you want the new column, then go to Add Column in the ribbon and click Add Custom Column. In the new window, change the New column name to Summary and enter the formula below:
=if Text.Start([Scheme], 2) = "X:" then "X" else [Type]
If you want to do it in Data View as a new column, you could use this formula:
=IF(LEFT(TableName[Scheme], 2)="X:", "X", TableName[Type])
You could do this in the Query Editor or by adding a new column in the Data View. For the Query Editor:
From the main report view, go to the Home tab and click Edit Queries to get to the Query Editor. Find your query where you want the new column, then go to Add Column in the ribbon and click Add Custom Column. In the new window, change the New column name to Summary and enter the formula below:
=if Text.Start([Scheme], 2) = "X:" then "X" else [Type]
If you want to do it in Data View as a new column, you could use this formula:
=IF(LEFT(TableName[Scheme], 2)="X:", "X", TableName[Type])