Questions tagged [m]

The M Modelling Language was a component of Microsoft's "Oslo" project, later known as SQL Server Modeling CTP. The project was canceled in late 2010 but the language was updated and incorporated into Power Query, Power BI, and Excel.

The M Modelling Language was a component of Microsoft's "Oslo" project, later known as SQL Server Modeling CTP. The project was canceled in late 2010.

See also:

1145 questions
55
votes
4 answers

What's the difference between DAX and Power Query (or M)?

I have been working on Power BI for a while now and I often get confused when I browse through help topics of it. They often refer to the functions and formulas being used as DAX functions or Power Query, but I am unable to tell the difference…
user2724541
46
votes
1 answer

How do I comment in Power Query M?

Is there a way to comment M code / comment out lines or blocks of code?
Chris
  • 1,313
  • 2
  • 13
  • 26
37
votes
2 answers

How can I reference a cell's value in PowerQuery

I'm having multiple PowerQuery queries that I would like to feed the value of a cell in my Excel file. In this particular case, the full path to the sourcefile name. Is there any way I can get this into PowerQuery?
Peter Albert
  • 16,917
  • 5
  • 64
  • 88
33
votes
3 answers

PowerQuery: How can I concatenate grouped values?

If I have the following table (shown in the image below), how can I write a grouped query that would concatenate the grouped results? For this example, I'd want to group by the LetterColumn and concatenate the NumberColumn So the desired results…
Giffyguy
  • 20,378
  • 34
  • 97
  • 168
27
votes
3 answers

What is the M language for?

I heard Microsoft developed a programming language called M. Can someone explain the use of M and how a C# programmer can benifit from M.
Embedd_0913
  • 16,125
  • 37
  • 97
  • 135
21
votes
3 answers

Is there any way to invoke PowerQuery/M outside of Excel or PowerBI?

Our BI team is really growing to like the Power Query ETL tool used within Excel and Power BI. The functional language M/PowerQuery has great utility and it would be nice to be able to utilize outside of the context of PowerBI. Is there or are there…
dkackman
  • 15,179
  • 13
  • 69
  • 123
15
votes
6 answers

Converting an Integer to a Text Value in Power BI

I’m creating a calculated column in a Power BI report. The calculated column concatenates integer and text columns. I tried using the below query to accomplish this, but it resulted in a syntax error. CalculatedColumn =…
bmsqldev
  • 2,627
  • 10
  • 31
  • 65
10
votes
1 answer

How to set a max run time / timeout for Power Query?

Is there a way to set a max run time or a timeout factor in Power Query so that after a specified period the query would terminate itself regardless of whether it was successfully executed or not? This is important for me because I have built…
J Henkinson
  • 133
  • 1
  • 1
  • 8
10
votes
1 answer

How to get paginated data from API in Power BI

Let's say we have this endpoint https://reqres.in/api/users. The response is { "page": 1, "per_page": 3, "total": 12, "total_pages": 4, "data": [ { "id": 1, "first_name": "George", …
David
  • 4,785
  • 7
  • 39
  • 63
10
votes
1 answer

Pass several parameters in StartLogin function

I am building a custom connector to connect to our API via OAuth2. This is so we can use our api as a data source to powerbi. // Resource definition Resource = [ Description = "MyAPI", Type = "Custom", …
sudeepdino008
  • 3,194
  • 5
  • 39
  • 73
7
votes
2 answers

Is there a short name for Power Query Formula Language (informally known as 'M') that isn't 'M'?

As always, naming things is hard. Power Query Formula Language is long M is short Is there a nice middle ground or are we sticking with 'M'? For example, there might be conflicts when it comes to creating things like Syntax Highlighting packages in…
Jay Killeen
  • 2,832
  • 6
  • 39
  • 66
7
votes
2 answers

Power Query -> Transform Comma to Period and Obtain Decimal Numbers

I'm working within Excel Query Editor (Power Query) and I have a table with many columns. Some of the numbers in those columns have a period (".") and they are properly recognized as decimal numbers, but some of them have a comma (",") and they are…
jb007
  • 243
  • 1
  • 5
  • 17
6
votes
1 answer

How to store credentials in Power BI DataConnector?

I'm building a custom Power BI DataConnector which uses OAuth. I'm following the github example. But this stores client credentials (required for the 'code flow' in OAuth) as plain text files. Is there a secure alternative to this ?
Neeraj
  • 2,376
  • 2
  • 24
  • 41
6
votes
2 answers

How do I convert #datetime to my local timezone?

A column in Power Query converts a JavaScript timezone into UK format: = #datetime(1970, 1, 1, 0, 0, 0) + #duration(0, 0, 0, [Timestamp]/1000) But this produces the wrong output (-1hr difference), presumably due to UTC / GMT+Summertime…
Adam
  • 1,932
  • 2
  • 32
  • 57
6
votes
3 answers

Select row with MAX value per category Power BI

How to select row with max value per category in M of Power BI. Suppose we have table: +----------+-------+------------+ | Category | Value | Date | +----------+-------+------------+ | apples | 1 | 2018-07-01 | | apples | 2 |…
Przemyslaw Remin
  • 6,276
  • 25
  • 113
  • 191
1
2 3
76 77