Forum Discussion

surendar12's avatar
surendar12
Regular Visitor
6 years ago
Solved

Parameter is not correct type

Hi ,     I have a measure called num_users .  Attached below is an excel format of the data . I am trying to create new measure : EARLIEST(num_users) and powerBI throws an error.       Th...
  • Anonymous's avatar
    Anonymous
    6 years ago

    HI surendar12 ,

    You can try to use following calculate column formula if it meets for your requirement:

    Column =
    VAR minPath =
        CALCULATE (
            MIN ( Table[Path_Sequence] ),
            FILTER (
                ALLSELECTED ( Table ),
                [Event_Date] = EARLIER ( Tabel[Event_Date] )
                    && [Category] = EARLIER ( Table[Category] )
            )
        )
    RETURN
        LOOKUPVALUE (
            Table[Num_users],
            Table[Event_Date], [Event_Date],
            Table[Category], [Category],
            Table[Path_Sequence], minPath,
            MIN ( Table[Num_users] )
        )
    

    Regards,
    Xiaoxin Sheng