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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Why can't I add fields to New Measure?

Please see screenshots below. I am trying to add the field [NUM BUS DAYS] from an existing source but it won't let me. When I type '[' in the Create New Measure text box, the only field that pops is another measure previously created.

 

Thanks in advance

 

 

power bi create measure can't add field.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

When I tried to add formula   IF(('Scheduled and Arrived Appts'[NUM BUS DAYS]) <=14, 1, 0) to a New Measure

   , I get this error:

A single value for column 'NUM BUS DAYS' in table 'Scheduled and Arrived Appts' cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result.

 

I was able to add this formula to a New Column instead and then use it in a New Measure

 

New Column : NPLESSTHAN14BUSDAYS = if([NUM BUS DAYS] <= 14,1,0)

New Measure : NP14BUSDAYS% = sum([NPLESSTHAN14BUSDAYS]) / count('Scheduled and Arrived Appts'[Appt Scheduled]) 

View solution in original post

4 REPLIES 4
ashishrj
Power Participant
Power Participant

@Anonymous Can you directly select column name from the dataset after = and check

Anonymous
Not applicable

Thank you for your feedback! Smiley Happy

 

Much to my frustration, it will not let me drag and drop the field in the Create New Measure textbox

 

power bi create measure can.jpg

Anonymous
Not applicable

When I tried to add formula   IF(('Scheduled and Arrived Appts'[NUM BUS DAYS]) <=14, 1, 0) to a New Measure

   , I get this error:

A single value for column 'NUM BUS DAYS' in table 'Scheduled and Arrived Appts' cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result.

 

I was able to add this formula to a New Column instead and then use it in a New Measure

 

New Column : NPLESSTHAN14BUSDAYS = if([NUM BUS DAYS] <= 14,1,0)

New Measure : NP14BUSDAYS% = sum([NPLESSTHAN14BUSDAYS]) / count('Scheduled and Arrived Appts'[Appt Scheduled]) 

You can't have naked column names in measures. They have to be aggregated in some way.





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

Proud to be a Super User!




Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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