powerbi

Power BI: how to merge specific tables

主宰稳场 提交于 2021-01-01 14:33:45
问题 I have Table A with data of specific people doing their tasks like this: I have Table B with data of needs for specific people for different periods of time like this: I also have additional table C with period definitions: Period no | Date from | Date to -------------------------------------- 1 | 27/01/2021 | 24/02/2021 2 | 25/02/2021 | 24/03/2021 ... There are 2 problems here: Someone in Table A can have Start and End dates spanning multiple periods, like for example Human B The Start and

Power BI: how to merge specific tables

。_饼干妹妹 提交于 2021-01-01 14:33:11
问题 I have Table A with data of specific people doing their tasks like this: I have Table B with data of needs for specific people for different periods of time like this: I also have additional table C with period definitions: Period no | Date from | Date to -------------------------------------- 1 | 27/01/2021 | 24/02/2021 2 | 25/02/2021 | 24/03/2021 ... There are 2 problems here: Someone in Table A can have Start and End dates spanning multiple periods, like for example Human B The Start and

ASC parameter when using TOPN function in Power BI

吃可爱长大的小学妹 提交于 2021-01-01 06:28:50
问题 I've got this data: Then have this measure: amount = SUM( play[amount] ) Then I've tried to use the ASC/DESC arguments of the TOPN function in these two measures: Top 2 customer per category ASC = VAR rnk = VALUES( play[customer] ) RETURN CALCULATE( [amount], TOPN( 2, ALL( play[customer] ), [amount], ASC ), RNK ) Top 2 customer per category DESC = VAR rnk = VALUES( play[customer] ) RETURN CALCULATE( [amount], TOPN( 2, ALL( play[customer] ), [amount], DESC ), RNK ) Now if I use these two

ASC parameter when using TOPN function in Power BI

拈花ヽ惹草 提交于 2021-01-01 06:28:39
问题 I've got this data: Then have this measure: amount = SUM( play[amount] ) Then I've tried to use the ASC/DESC arguments of the TOPN function in these two measures: Top 2 customer per category ASC = VAR rnk = VALUES( play[customer] ) RETURN CALCULATE( [amount], TOPN( 2, ALL( play[customer] ), [amount], ASC ), RNK ) Top 2 customer per category DESC = VAR rnk = VALUES( play[customer] ) RETURN CALCULATE( [amount], TOPN( 2, ALL( play[customer] ), [amount], DESC ), RNK ) Now if I use these two

How to show data properly in Office Excel Using Power Query Editor?

戏子无情 提交于 2020-12-26 06:56:22
问题 I have below JSON output from an API, in Office Excel I am importing data via Web from API. [{ "level": 1, "children": [{ "level": 2, "children": [{ "level": 3, "name": "Chandni Chowk", "data": ["Data 1", "Data 2"] }], "name": "Delhi", "data": ["Delhi Area"] }], "name": "Country", "data": ["India", "Bangladesh"] }] https://docs.microsoft.com/en-us/powerquery-m/quick-tour-of-the-power-query-m-formula-language I have above document. let Source = Json.Document(Web.Contents("MY API URL GOES HERE"

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

How do I retrieve a bearer token from a service in Power BI?

喜你入骨 提交于 2020-12-15 06:45:33
问题 I am attempting to call a web API-- say, https://myresources/getresources . This call requires an API Key, resourcesApiKey and a bearer token. The token must be acquired from another service, https://mytokenservice/jwt . It requires an API key, tokenServiceApiKey. I'm able to get my resource data by manually accessing the token service and entering values, but I'd like to have Power BI take care of all this for me. I read something about this here, but this seems to apply to a static token.

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

Is there a way to showcase the differences between two versions of the same file in PowerBI?

故事扮演 提交于 2020-12-15 05:34:30
问题 Let's say that on a daily basis I download a CSV file and I would like to show in the dashboard the differences between the two versions of the same file(today and the day before) in the dashboard such as for example, the number of new rows added to that file(these could be defined as new cases), or the number of cells that were changed from one category to another, such as 'Still Ill' to 'Recovered'. Is this possible to achieve through a DAX Expression or through a specific transformation