Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

Error: The Value for 'FirstName' cannot be determined

I copied a formula that is working for me in another dashboard file over to a new dashboard file and it will not work... it is referencing the same exact table and data so I am clueless as to why.

 

I created a measure and then typed:

FullName = [FirstName] & " " & LEFT([LastName],1) & "."

 

I am getting the error "The value for 'FirstName' cannot be determined.  Either 'FirstName' doesn't exist, or there is no current row for a column named 'FirstName'."

 

There is a column FirstName and a column named LastName, both of which have names in them.  What am I doing wrong?

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @Anonymous,

 

Is this a calculated measure or a column?

 

Believe that by the error you are showing that you are creating a measure when doing that you need to do an aggregation that is why it's not working.

 

Try to use the same formula but as a column.

 

Just one additional tip on DAX you should always refer the measures and columns accordingly to the notation below:

  • Column - Table[ColumnName]
  • Measure - [MeasureName]

 

If you do it like this you will identify faster the use of measures or columns in your formulas.

 

Regards,

MFelix


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

4 REPLIES 4
Anonymous
Not applicable

I copied a formula that is working for me in another dashboard file over to a new dashboard file and it will not work... it is referencing the same exact table and data so I am clueless as to why.

 

I created a measure and then typed:

FullName = [FirstName] & " " & LEFT([LastName],1) & "."

 

I am getting the error "The value for 'FirstName' cannot be determined.  Either 'FirstName' doesn't exist, or there is no current row for a column named 'FirstName'."

 

There is a column FirstName and a column named LastName, both of which have names in them.  What am I doing wrong?

help2.JPG

MFelix
Super User
Super User

Hi @Anonymous,

 

Is this a calculated measure or a column?

 

Believe that by the error you are showing that you are creating a measure when doing that you need to do an aggregation that is why it's not working.

 

Try to use the same formula but as a column.

 

Just one additional tip on DAX you should always refer the measures and columns accordingly to the notation below:

  • Column - Table[ColumnName]
  • Measure - [MeasureName]

 

If you do it like this you will identify faster the use of measures or columns in your formulas.

 

Regards,

MFelix


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



Anonymous
Not applicable

You were right.  I created a column and used the same formula and it works.  I do not fully understand why but I thank you.

Hi @Anonymous,

 

This as to do with context, when you make a calculated column the context is the row in wich it's in so in your case you are looking at the first name / last name on that specific row. When using the measures the context changes accordingly to your data so you need to ad an aggregator like sum, max, min and so on, this makes that the measures can be calculated at different levels of aggregation and details.

 

Check this link with a explanation on both.

 

Regards,

MFelix


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.