Forum Discussion

chavanr's avatar
chavanr
Resolver I
4 years ago
Solved

Format error when creating measure

Hi there,

 

I have created a measure which is giving following error

All the fields are in date/time format.

 

Just wondering still giving the above error.

 

Cheers

  • chavanr's avatar
    chavanr
    4 years ago

    Yes, i understand that but how do we handle because i want to use it as a condition where there is blank it should consider value from another column.

  • chavanr 

    Try it like this.

     

    Time out testing =
    IF (
        'Weighing Details New'[Time Out] = BLANK (),
        'Weighing Details New'[New Weighing data.Timeout],
        'Weighing Details New'[Time Out]
    )
    

     

    or this

     

    Time out testing =
    IF (
        ISBLANK ( 'Weighing Details New'[Time Out] ),
        'Weighing Details New'[New Weighing data.Timeout],
        'Weighing Details New'[Time Out]
    )

     

    or this

    Time out testing = COALESCE ( 'Weighing Details New'[Time Out], 'Weighing Details New'[New Weighing data.Timeout] )

     

  • i have done the transformation in m query using If with conditional column

4 Replies

    • chavanr's avatar
      chavanr
      Resolver I

      Yes, i understand that but how do we handle because i want to use it as a condition where there is blank it should consider value from another column.

      • jdbuchanan71's avatar
        jdbuchanan71
        Super User

        chavanr 

        Try it like this.

         

        Time out testing =
        IF (
            'Weighing Details New'[Time Out] = BLANK (),
            'Weighing Details New'[New Weighing data.Timeout],
            'Weighing Details New'[Time Out]
        )
        

         

        or this

         

        Time out testing =
        IF (
            ISBLANK ( 'Weighing Details New'[Time Out] ),
            'Weighing Details New'[New Weighing data.Timeout],
            'Weighing Details New'[Time Out]
        )

         

        or this

        Time out testing = COALESCE ( 'Weighing Details New'[Time Out], 'Weighing Details New'[New Weighing data.Timeout] )