Forum Discussion
"New column" greyed out in Semantic Model builder
- 1 year ago
Hello dolphinantonym,
Because the semantic model is based on a direct lake mode, the option is grayed (disabled).
But how do you do it ?
Option 1 : add the calculated column directly in the source (whether is excel or create view or other sources)
Option 2 : if you are storing data into a lakehouse, you can use notebooks with sparkSQL or pyspark or Dataflow gen2 (low code) to add calculated columns into the table in your lakehouse.
Option 3 : if you are storing data into a warehouse : add the column in your warehouse, change dataflow, change column mapping and rerun.
I found this video helpful for your need : https://www.youtube.com/watch?v=kFQ-dNBUUF4
Hope it can help you !
Best regards,
Antoine
- 1 year ago
Thank you for the reply.
I am storing data in a Lakehouse, but none of those options apply because I want my calculated column to handle unmatched cases in reports. The below shows the kind of thing I have in my Lakehouse - Table 1 is relationshipped to Table 2, but when building a report based primarily on Table 1 I want to calculate something that can show "No details available":
Table 1 Table 2 Report ID Table 2 ID ID Details Table 1 ID Details 1 a a A - details 1 A - details 2 b b B - details 2 B - details 3 c c C - details 3 C - details 4 4 No details available I could create the report as a table using Notebooks if I wanted to, but that would result in storing an unneccessary amount of data so I'm looking into ways to calculate this dynamically in the Semantic Model instead so that it is only calculated at the point of use.
Hi dolphinantonym , hope you are doing great. May we know if your issue is solved or if you are still experiencing difficulties. Please share the details as it will help the community, especially others with similar issues.
- josef789 months ago
Memorable Member
The correct approach is to rewrite the calculation upstream (SQL, Dataflow, Notebook, Materialized View, etc.).
The easiest way is to move the calculation to Power Query (Dataflow). This can be done quickly: just copy & paste the DAX expression into the Add Column Copilot box in Dataflow. AI will translate it into M and perform the calculation in Power Query.
Another good option for automated conversion is to use VS Code. Save your model as a PBIP, open it in VS Code, and ask Copilot to convert all DAX calculated columns into Power Query calculated columns.