Forum Discussion

Kumar11109's avatar
Kumar11109
Helper IV
9 years ago
Solved

Tagging Videos For each session

I have a data set in which I need to tag resources used in a session, starting from 1. I am attaching an image for a sample of my data set. Please help me... 

 

 

14 Replies

  • v-chuncz-msft's avatar
    v-chuncz-msft
    Community Support

    Kumar11109,

     

    You may use the following DAX to add a calculated column.

    Flag =
    IF (
        MAXX (
            TOPN (
                1,
                FILTER ( Table1, Table1[Session ID] = EARLIER ( Table1[Session ID] ) ),
                Table1[Start Time], ASC
            ),
            Table1[Resource]
        )
            = 1,
        1,
        0
    )
    
    • Kumar11109's avatar
      Kumar11109
      Helper IV

      There is one slight error, that my session id's are in alpha numeric and so the format its format is text. And when I am using your suggested formula the following error is shown: 

       

      DAX comparison operations do not support comparing values of type Text with values of type Integer. Consider using the VALUE or FORMAT function to convert one of the values.

       

      I tried formatting it using format and value function but to no avail.