Over the past couple of weeks, I have been working on a project where I was required to build a #PowerBI connector for an API.
I have to say, this is an interesting experience, because I was learning a new language in the process. Welcome to the M language.
#DataModeling
🧵
M Language, stands for Data Mashup or Data Modelling language, is a very simple but powerful modelling language.
Basically, M language takes input data, model it, and exports it.
Let's look into the simplest M language "let" block. Image
"Let" is a block used for data modelling. Basically it starts with the famous "let" keyword. Which is similar to "let" in Javascript; it basically defines a variable.
In the previous example, we created a dictionary called "source" (for data source), which defines first and last names
"let" statements are comma separated, and evaluated sequentiall. That means you can do something like that. Image
This basically, adds a new variable called #"First Name", and assigns it the value of the "First Name" from the source dictionary.
Did you notice how you can have variables with spaces 😱

Yes, that's true, you can call a variable anything, as long as you precede it with # character, and encapsulate it in double quotes.

#"This is an acceptable variable name in M language"
Finally, the last part and the most confusing part. The "in" keyword.
In M language, you can consider "in" as "output".
So the output of this "let" statement, is the #"First Name", or "Mina"
Was that helpful to you?
Let me know your thoughts in comments, also, feel free to add any additional knowledge.
Do you like more information about M language and building Power BI connectors?

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Mina Abadir

Mina Abadir Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!

Follow Us on Twitter!