Forum Discussion

Analitika's avatar
Analitika
Post Prodigy
6 years ago
Solved

Cant match string

I have measure nor one of that is not work

Measure = if("PARD" IN DISTINCT ('Table'[rus_kod]) ,1,0)

Measure = if("PARD" = max('Table'[rus_kod]) ,1,0)
 
wtf?
 
rus_kod have no difference in codes "PARD" code in unique
  • Anonymous's avatar
    Anonymous
    6 years ago

    Hi Analitika ,

    Thanks for sharing your pbix file. As checked the data which the value of field rus_kod is "PARD", there is only one record which did_dat is on Mar 3, 2015. And as put the following measure on the table visual, it works well. I'm not sure if something missing here and cause that can't reproduce your problem...

    Best Regards

    Rena

13 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Analitika ,

     

     

    What is the expected output ?

     


    Regards,

    Harsh Nathani


    Appreciate with a Kudos!! (Click the Thumbs Up Button)

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

    • Analitika's avatar
      Analitika
      Post Prodigy

      All must be 1 as "PARD" always must be = "PARD"

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Analitika ,

     

    For Measure

     Measure = if(MAX('Table'[rus_kod] )= "PARD" ,1,0)

     

     

    For Column

    CColumn = if('Table'[rus_kod] )= "PARD" ,1,0)

     


    Regards,

    Harsh Nathani


    Appreciate with a Kudos!! (Click the Thumbs Up Button)

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

     

     

    • Analitika's avatar
      Analitika
      Post Prodigy

      As i mentioned 

      For Measure

       Measure = if(MAX('Table'[rus_kod] )= "PARD" ,1,0)

       

      is not work and return me for half 0 for other 1 ðŸ˜¡

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi Analitika ,

         

        Measure = if(TRIM(MAX('Table'[rus_kod] ))= "PARD" ,1,0)

         

        Regards,

        Harsh Nathani