cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
TDMatthews Regular Visitor
Regular Visitor

Basic Question on Columns and formulas

Hello, I have a couple generic questions regarding adding columns to my data. In my source table I have 2 columns for the date and time. I need to represent that as 1 column in reports so in my edit queries I created a column as 

 

newdatetime = Text.From([log_date]) & " " & Text.From([time])

 

This trippled the size of my model and I understand it to be due to a combined field like this having less compressability. Is it not possible to have this as a computed value that is not persisted in the model?

 

And maybe related to this, I was trying to extract a portion of several columns (and do some math etc) as a formula like below. My example is simplified, so in reality column split isn't an answer. In the add custom column of edit queries this produces an error (Expression.Error: The name 'LEFT' wasn't recognized) even though it says the syntax is fine. In the modeling screens new column it does not produce an error. Are they using different languages or syntaxes?

 

newcol = LEFT([original_col],3)

 

Also the new columns added in modeling don't appear in the edit queries, which makes me wonder if I'd added my concatenated date & time field there if it would not have physically been stored. I find all this a bit confusing and wonder which place I should be adding custom columns.

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Basic Question on Columns and formulas

@TDMatthews

 

In Edit Query (Query Editor) you are using Power Query (M). In other sections in Power BI you are using DAX.

 

 

 

 




Lima - Peru
Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!




2 REPLIES 2
Super User
Super User

Re: Basic Question on Columns and formulas

@TDMatthews

 

In Edit Query (Query Editor) you are using Power Query (M). In other sections in Power BI you are using DAX.

 

 

 

 




Lima - Peru
Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!




Highlighted
TDMatthews Regular Visitor
Regular Visitor

Re: Basic Question on Columns and formulas

Thanks very much. Basic question but that helps!