Skip to main content

Power BI

New

Replace DAX with F#

Vote (15) Share
Boris Lipschitz's profile image

Boris Lipschitz on 19 Aug 2015 08:59:03

Why reinvent the wheel. There is already powerful functional language F#

Comments (7)
Boris Lipschitz's profile image Profile Picture

40efc18d c394-460f-b5d1-7cef84429ab8 on 06 Jul 2020 00:01:30

RE: Replace DAX with F#

F# instead of M should have been the approach from the beginning. Now it's sadly too late, I believe. But if at least we could choose F# over M in Power Query that would be something.

Boris Lipschitz's profile image Profile Picture

b61ad2cf 5bba-4327-a3da-6e1c715e28e5 on 05 Jul 2020 23:42:58

RE: Replace DAX with F#

I believe that F# should have been adopted as power query language instead of (the not so well documented) M.

Boris Lipschitz's profile image Profile Picture

de4a7498 ebf5-4321-8789-9744a106cde2 on 05 Jul 2020 23:35:07

RE: Replace DAX with F#

Well, I'd say DAX is a part of Power BI itself as it is for the Excel object model management system.

This said, I agree with you: having a means to interface and affect Power BI output (a visualization of data) using F# would be awesome.

I am seeing this in somewhat an opposite point of view, maybe: I would like to just use F# to create Power BI objects, rather than having F# instead of DAX. And I do not believe we need F# IN Power BI, if this is what you want.

DAX is manipulating the data objects very directly within the same interface in Excel or Power BI. I believe what you want to have is the syntax of F# within Power BI. Am I right on this?

In that case, I do not see much advantage in having F# embedded in Power BI to replace DAX. DAX is way better than F# for it, and much more lightweight.

Apart from this, the fact that it would be possible to influence Power BI elements by the use of F#, yes, I am fully buying the idea. But mind this:

DAX is NOT a programming language: it is rather a formula language. In that sense, DAX is not a functional language for it is not a language for programming. It is a query language that is also a formula language and its sole purpose is to aggregate calculated data to your current data with the aim to extend the significance of the output that you can create with your data (that is the GUI of Power BI).

Using F# to affect Power BI objects is just too limited for F#. Is just like using an elephant to kill a fly... it is too much.

Mind also: DAX is not reinventing anything today. It has been part of the Excel Object Model for some years. DAX is not exclusive to Power BI. Rather, the idea of DAX was to query the object model behind Excel using the Power Pivot add-in. That was in 2010, and was created by the team behind SQL at Microsoft.

So DAX is a query language that uses a formula syntax to match the Excel way of working. It is now also used in Power BI, and that is what DAX is meant to do. It does it perfectly.

In th

Boris Lipschitz's profile image Profile Picture

4a6da36a 56d3-4060-8e88-94aafb7c907d on 05 Jul 2020 23:26:02

RE: Replace DAX with F#

F# support in Power BI would be very valuable.

Dax -> M -> F# could be a good way for people to lean some funcational programming concepts.

Boris Lipschitz's profile image Profile Picture

7c5234e3 af6b-4657-9e0e-ca9f1cda0b65 on 05 Jul 2020 23:18:21

RE: Replace DAX with F#

Definitely a great idea to have F# support. It will be good for the both of them. F# can be extremely powerful in data science and analytics ... what it lacks is libraries (e.g., designing a good dashboard with F# requires knowledge of more languages and associated frameworks than just F# while say in R you can get by just fine with Shiny and Shinydashboard which are simple and easy to learn) and tooling (e.g., being supported in Power BI, much better documentations and tutorials, native GPU computing, etc). They will help each other mature much better. F# is beautiful and natural for data-oriented tasks and it is excellent for data import, pre-processing, and some processing. In the modelling realm, it is much lacking but other than that ... it would be a boon. Maybe Microsoft should take better care of its children, specially such a bright one full of potential, rather than treating it like an unwanted orphan!!!

Boris Lipschitz's profile image Profile Picture

b028516b 102c-433c-81f4-932e02b94b27 on 05 Jul 2020 22:31:53

RE: Replace DAX with F#

F# in realm of BI is the killer app

Boris Lipschitz's profile image Profile Picture

2f070e0c 1fce-4260-9ab2-f421bac6af08 on 05 Jul 2020 22:21:17

RE: Replace DAX with F#

Keep DAX but support F# too :)