Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

DAX comparison operations do not support comparing values of type Date with values of type Text

Hello,

 

today i got the following error:

Goal:
I want to create a visual to show the count of different rows in one table. 

 

My solution: 

NoEmmPlayout = COUNTROWS(FILTER(STBs,STBs[SGIS pre migration status] = "ReadyForMigration" && STBs[Settings completion time (First contact to SGIS)] = "" && STBs[Nagra_EMM_Playout] = "" || STBs[Nagra_EMM_Playout_Status] = "" && STBs[SGIS pre migration time]>24 ))
 
Thats when i got the error. Should i use some other expression?

Thank you!


Kind Regards
Jannis

6 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    That was it! Fairly simple. 😄

    Thanks my friend. 

    BR
    Jannis

  • Hi there!

    Try replacing STBs[Settings completion time (First contact to SGIS)] = "" with STBs[Settings completion time (First contact to SGIS)] = BLANK()

    Let me know if that helps!

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hey,

       

      sadly that did not work. 😞

      • PabloDeheza's avatar
        PabloDeheza
        Icon for Solution Sage rankSolution Sage

        Make sure that you replace every "" with BLANK()

  •   Anonymous 

    NoEmmPlayout = COUNTROWS(FILTER(STBs,STBs[SGIS pre migration status] = "ReadyForMigration" && STBs[Settings completion time (First contact to SGIS)] = "" && STBs[Nagra_EMM_Playout] = "" || STBs[Nagra_EMM_Playout_Status] = "" && STBs[SGIS pre migration time]>24 ))

     

    Somewhere above, bold, you are trying to compare Date with Text which is not allowed

     

    You need to make use of format as https://community.powerbi.com/t5/Desktop/Error-DAX-comparison-operations-do-not-support-comparing-values/m-p/559413

     

    Regards,

    Ritesh

    Mark my post as a solution if it helped you| Munde and Kudis (Ladies and Gentlemen) I like your Kudos!! !!

    My YT Channel Dancing With Data !! Connect on Linkedin !!Power BI for Tableau Users 

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thanks. 

      The topic of that thread is "comparing values of type Text with values of type Int" 
      My topic is "comparing values of type text with values of type date". 

      How can i achieve that? Thanks.