powerquery

Move up values when null Power Query

守給你的承諾、 提交于 2020-12-15 07:57:26
问题 At this moment I have a big table in Excel that I would like to use with dynamic dropdown (cascade options). Depending on the selection you do on the first dropdown, then in the next cell, you should have a filtered drop down menu. Also, any option is unique for the main category selected. The first thing I did was to take the columns I need and pivot them so it looks something similar to this (C are the column names and V are the values. Since any option is unique for any category, I have

Converting Case statement, Filter from t-SQL query to DAX

半城伤御伤魂 提交于 2020-12-15 07:13:35
问题 I have a problem converting below t-sql query into DAX. Overview - There are two sample tables - Table1 and Table2 with below schema Table1 (ID varchar(20),Name varchar(30)) Table2 (CapID varchar(20),CAPName varchar(30), CapID_Final varchar(20)) Please note : There exists one to many relationship between above tables : [ID] in Table2 with [CapID] in Table1 I am trying to derive CapID_Final column in table2 based on conditions as per my t-SQL query in below which works perfectly fine - SELECT

Converting Case statement, Filter from t-SQL query to DAX

…衆ロ難τιáo~ 提交于 2020-12-15 07:12:29
问题 I have a problem converting below t-sql query into DAX. Overview - There are two sample tables - Table1 and Table2 with below schema Table1 (ID varchar(20),Name varchar(30)) Table2 (CapID varchar(20),CAPName varchar(30), CapID_Final varchar(20)) Please note : There exists one to many relationship between above tables : [ID] in Table2 with [CapID] in Table1 I am trying to derive CapID_Final column in table2 based on conditions as per my t-SQL query in below which works perfectly fine - SELECT

PowerQuery - Fill missing data according to specific pattern

ⅰ亾dé卋堺 提交于 2020-12-15 06:08:25
问题 I am trying to clean data received from an Excel file and transform it using PowerQuery (in PowerBI) into a useable format. Below a sample table, and what I am trying to do: | Country | Type of location | |--------- |------------------ | | A | 1 | | | 2 | | | 3 | | B | 1 | | | 2 | | | 3 | | C | 1 | | | 2 | | | 3 | As you can see, I have a list of location types for each country (always constant, always the same number per country, ie each country has 3 rows for 3 location types) What I am

Combining multiple sheets with different columns using Power Query

ぃ、小莉子 提交于 2020-12-13 04:03:30
问题 I have a workbook with multiple pages that need to get combined, i.e. stacked, into one table. While they have many similar column names, they do not all have the same columns and the column order differs. Because of this I cannot use the inherent merge functionality because it uses column order. Table.Combine will solve the problem, but I cannot figure out to create a statement that will use the "each" mechanic to do that. For each worksheet in x workbook Table.Combine(prior sheet, next

How to join two tables in PowerQuery with one of many columns matching?

拈花ヽ惹草 提交于 2020-12-11 05:03:57
问题 Let's assume we have two PowerQuery queries: a query named Query1 with columns Col1_1 and Col1_2 a query named Query2 with columns Col2_1 and Col2_2 I know it's possible to join these two queries with a merge query like this: let Source = Table.NestedJoin(Query1,{"Col1_1", "Col1_2"},Query2,{"Col2_1", "Col2_2"},"Query2",JoinKind.LeftOuter) in Source In SQL, this could be represented as SELECT * FROM Query1 LEFT JOIN Query2 ON Query1.Col1_1 = Query2.Col2_1 AND Query1.Col1_2 = Query2.Col2_2