官术网_书友最值得收藏!

Add Column From Examples

One option that can make complex data transformations seem simple is the feature called Add Column From Examples. Using Add Column From Examples, you can provide the Power Query Editor a sample of what you would like your data to look like, and it can then automatically determine which transforms are required to accomplish your goal. Continuing with the same failed banks example, let's walk through a simple example of how to use this feature:

  1. Find and select the Add Column tab in the Power Query Editor ribbon.
  2. Select the Column From Example button and, if prompted, choose From All Columns. This will launch a new Add Column From Examples interface.
  3. Our goal is to leverage this feature to combine the City and ST columns together. In the first empty cell, type Chicago, IL and then hit Enter. You should notice that below the text you typed Power BI has automatically translated what you typed into a transform that can be applied for every row in the dataset.
  1. Once you click OK, the transform is finalized and automatically added to the overall M query that has been built through the user interface:
Adding Columns from Examples
Sometimes, you may encounter scenarios where the Add Column From Examples feature needs more than one example to properly translate your example into an M query function that accomplishes your goal. If this happens, simply provide additional examples of how you would like the data to appear, and the Power Query Editor should adjust to account for outliers.
主站蜘蛛池模板: 来凤县| 庆阳市| 改则县| 通山县| 隆昌县| 海原县| 辽源市| 诏安县| 珲春市| 舞阳县| 阿坝县| 井研县| 建阳市| 太康县| 台南市| 喀什市| 井研县| 深圳市| 东辽县| 临夏县| 岑溪市| 南昌市| 洛浦县| 岳普湖县| 宜州市| 浙江省| 肃南| 楚雄市| 乌拉特后旗| 洛南县| 蓬莱市| 会宁县| 鄂托克前旗| 宜兰市| 锡林浩特市| 德保县| 越西县| 石棉县| 隆尧县| 磴口县| 龙井市|