The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
I have created several PBI dataflows with the intention of having them feed a PBI datamart. I want to create some calculated fields in the flow using DAX, just like I do on PBI desktop. However, I don't seem to see an option that would allow me to create calculated fields using DAX. I do see the option to create a measure in the datamart, but I don't see anything about calculated fields. How would I be able to build calculated fields using DAX?
Solved! Go to Solution.
Absolutely. Having these complex calculated columns in the first place is a design red flag. Don't forget -they eat up space AND compute when they are calculated.
Hi @ldwf
In Power BI dataflows, you can't create calculated fields using DAX directly as you do in Power BI Desktop. Dataflows use Power Query, which relies on M code for transformations and calculations
But unfortunately, there isn't a direct tool to convert DAX to M code.
Just as lbendlin posted that you'd better off re-implementing the business logic.
Otherwise you can only use M-code to rewrite your calculated column as a custom column manually, I believe this is a huge amount of work.
Solved: Creating a calculated table in PowerBI Service dat... - Microsoft Fabric Community
Best Regards
Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
There is no need for DAX. use Table.AddColumn in your Power Query M code.
Some of the DAX code we build is quite extensive, i.e, like 50 or more lines for just one calculated column. If I want to clone these calculated columns, do I need to rebuild all the DAX formulas in Power Query M code?
Absolutely. Having these complex calculated columns in the first place is a design red flag. Don't forget -they eat up space AND compute when they are calculated.
is there a tool for converting DAX to Power Query M?
Not that I am aware of. You are likely better off re-implementing the business logic.
User | Count |
---|---|
37 | |
14 | |
12 | |
11 | |
8 |
User | Count |
---|---|
48 | |
36 | |
22 | |
22 | |
18 |