Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
9 years ago
Solved

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

 

 

 

  • Anonymous's avatar
    Anonymous
    9 years ago

    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]) 

4 Replies

  • ashishrj's avatar
    ashishrj
    Icon for Power Participant rankPower Participant

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

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thank you for your feedback! :smileyhappy:

       

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

       

      • Anonymous's avatar
        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])