Quantcast
Channel: All Power Query posts
Viewing all 122718 articles
Browse latest View live

What does the red and white dashed line in query editor represent?

$
0
0

Does anyone know what the red and white dashed line represents in query editor? I assume it means that something needs to be addressed, but I am not seeing any errors.

 

red and white line.JPG

 

 

 


Re: Add end date to row

$
0
0

Hi  

 

Try this 

let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WqlTSUaoAYiNDfQNDfSMDQ0ulWB0kYQuswgYm+gZGmMKGhtiFLVCEq4BC5SBhc+zCpvoGxliELRDCsQA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [Customer = _t, Contract = _t, #"Start Date" = _t]), #"Changed Type" = Table.TransformColumnTypes(Source,{{"Customer", type text}, {"Contract", type text}, {"Start Date", type date}}), #"Added Custom" = Table.AddColumn(#"Changed Type", "End Date", each let sDate = Number.From( [Start Date] ), selectRows = Table.SelectRows( #"Changed Type", (r) => Number.From( r[Start Date] ) > sDate and r[Customer] = [Customer] and r[Contract] = [Contract] ) in List.Min( selectRows[Start Date] )) in #"Added Custom"

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
Mariusz Repczynski

 

Filtered Rows against View native query

$
0
0

Hi,

When i apply "Filtered Rows" in Query Editor the "View native query" is greyed out when I right click on the Applied step!!

This means that the query folding will not take effect at this step in the server and therefore the hard work will be done by my desktop and of course more time is consumed.

 

Is there a solution to this?  

Re: Column names with reserved keywords not being identified properly while importing data in Power

$
0
0

I realized that there was space at the end of the field name that made PowerBI to not identify it properly. Thanks for the help. Appreciate it 🙂

 

Re: Column names with reserved keywords not being identified properly while importing data in Power

$
0
0

Thanks for the response. I realized there was a space after the field name that made PowerBI to not identify the field properly.

 

Re: More rows than filtered in Power query

$
0
0

Hi Edhan,

your reply helped me better understand my issue:

The data source is supported by the Power BI native query. I tested and it worked, I simply applied an SQL script in the data source settings and it imported only the rows that I filtered.

 

However when i apply "Filtered Rows" in Query Editor the "View native query" is greyed out when I right click on the Applied step!!

This means that the query folding will not take effect at this step in the server and therefore the hard work will be done by my desktop and of course more time is consumed.

 

Is there a solution to this?  

 

Re: More rows than filtered in Power query

$
0
0

Well, maybe.

 

If you typed something in the data source settings, NOTHING will fold after that. You are hardcoding the starting point.

What happens if you just connect to the data source, the database then a table? You should get two steps, a Source, and Navigation. If you right-click on Navigation and you can View Native Query, you should see something like this (This is the Person table in AdventureWorks2017.

 

select [$Table].[BusinessEntityID] as [BusinessEntityID], [$Table].[PersonType] as [PersonType], [$Table].[NameStyle] as [NameStyle], [$Table].[Title] as [Title], [$Table].[FirstName] as [FirstName], [$Table].[MiddleName] as [MiddleName], [$Table].[LastName] as [LastName], [$Table].[Suffix] as [Suffix], [$Table].[EmailPromotion] as [EmailPromotion], [$Table].[AdditionalContactInfo] as [AdditionalContactInfo], [$Table].[Demographics] as [Demographics], [$Table].[rowguid] as [rowguid], [$Table].[ModifiedDate] as [ModifiedDate] from [Person].[Person] as [$Table]

 

At that point, you should be able to filter.

 

If you do not see View Native Query (grayed out) then it could be your data source and Power Query just doesn't understand how to create native statements for it.

 

If that is the case, then you just need to modify the advanced query when you are doing the connection to have your first step or two in the statement. This is filtering just for "EM" person type in the same table as above.

 

select [_].[BusinessEntityID], [_].[PersonType], [_].[NameStyle], [_].[Title], [_].[FirstName], [_].[MiddleName], [_].[LastName], [_].[Suffix], [_].[EmailPromotion], [_].[AdditionalContactInfo], [_].[Demographics], [_].[rowguid], [_].[ModifiedDate] from [Person].[Person] as [_] where [_].[PersonType] = 'EM'

 

That will prefilter your data. You can also eliminate columns here you don't need.

 

I've never seen an advanced statement work in the connection dialog but folding not work if you don't use an advanced statement, so I'd have to actually see your connection and play with it, which obviously isn't possible. It sounds like you just might have a data source that accepts a SQL statement, but not one that Power Query can generate, and it could be the ODBC driver being the issue. It may not be passing along enough info for PQ to know what it is, or it simply is a source PQ doesn't support for folding.

 

Re: What does the red and white dashed line in query editor represent?

$
0
0

The green dashed line means there are errors. What does your Column Quality and Column Distribution say? Turn those on. I haven't seen the red dashed line yet, other than when I was making changes so fast it was just an error in the computation of that box. The fix was to select another query then go back to what i was working on, or force a refresh.


Re: More rows than filtered in Power query

$
0
0

The advanced query works fine with the ODBC Driver, the problem is that the report is built and deployed for a client and the report contains many tables so imagine the Hard coding that i have to go through..

 

In my Power query the 2 steps Source and Navigation are there for all tables but the problem is that i am able to see the code but i can't edit it in order to add some filters.

Re: What does the red and white dashed line in query editor represent?

$
0
0

Whatever it was, it disappeared. Thanks for the info on those column metrics though. I hadn't used them before!

Re: What does the red and white dashed line in query editor represent?

$
0
0

Probably the same transient error I've run into that a refresh fixes.

Match a pair of values from one column based on multiple other columns

$
0
0

I have the following structure:

DateObject IDType
1/1/2019100023A
1/1/2019100025A
1/1/2019100023B
1/2/2019100065A
1/2/2019100098B
1/2/2019100098A
1/3/2019100052A
1/3/2019100052A
1/3/2019100058A

My goal is to have Power Query flag a Match whenever both type A and B share the same Object ID and Date.

 

I am interested to know if the A/B match happens multiple times for the same Date/Object ID combo. I do not need to know if only A or only B mathc multiple Date/Object ID combos. I've tried creating many variations of GroupBy tables and Calculated Columns but have not found a solution. Can someone please help with this? Thank you!

Re: Match a pair of values from one column based on multiple other columns

$
0
0

Hi  ,

Created a copy of the table, filtered 1 for A and 1 for B, Merged them based on the first two columns and then expanded for the last column. From there you can through a flag on the condition. Or you can filter out null, and end up with the values that match.

Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos are nice too.
Nathaniel
match.PNG

 

Re: Flagging DateTime records in Power Query with multiple conditions

$
0
0

Hi  

 

Thanks for the reply on this. 

Flag of 14,16 and 17 has to be "1" only as per this rule:

"Flag "1" if records have start time and end time across standard values like (Ind ID= 14,16,17)"

 

Let me elaborate:

We need to show some chart at every 5 min interval (standard values like 8:00:00, 8:05:00, 8:10:00...) so when for any individual he is detected on these standard values he should be picked for calculation.

Therefore,

14 - when his end time detected on standard value

16- when he is detected at standard value between start time and end time

17- when his start time detected on standard value.

 

I hope this clarifies. 

I checked your code, it worked fine can we include record 14 also there?

 

Mann

 

Re: Power BI Athena Incremental Refresh

$
0
0

Any update on this? I have the same problem. Date parameters on Power BI show up as question marks in Athena giving Syntax errors


Re: Match a pair of values from one column based on multiple other columns

$
0
0

Thank you. What a great, simple solution! 

Re: Match a pair of values from one column based on multiple other columns

$
0
0

Hi  ,
You are welcome! A lot of my knowledge in Power Query comes from reading M is for (Data) Monkey by  .
Nathaniel

Re: Merge Columns based on one column from one table and two from the second

$
0
0

You are going to have to explain clearly how you would expect this join to work. If they both have an ID field, but they aren't the same ID, they won't join. Even a fuzzy merge won't work well here. That is for merging things like North Carolina and NorthCarolina.

 

You could create a Transformation Table for the fuzzy merge if you want to hand point ID1 to ID2. See this article for a really good overview of how that works.

Re: Add a Leading Zero within Column?

$
0
0
Hi

Change it to the name of whatever step is preceding this one (e.g. Source).

Kind regards,
John

Re: Importing table from SSAS model: Hidden columns

$
0
0

Hi alekskr,

I test the Tabular model in my environment, I find that there is no method to get the hide column field in Powerbi  pane currently, you need to change this in AS server or you could try to use live connect.

In addition, you could get the data of the hidden column, you need to query it directly when connect it from Powerbi

475.PNG

I think you could post this requirement on power-bi-ideas 

Best Regards,
Zoe Zhi

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Viewing all 122718 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>