Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Probably a simple answer...

Hi Power-Bi Community,

I have a question that probably has a really simple answer... but I appreciate anyones help with this!

So, if I have a colmun of activities and another coumn of values (which are the hours it took to complete the activity.

In the value column I have blanks, 0's and then values higher then 0

I want to create a new measure (either by Quick Measure or a DAX) to show True or False (True if there is any value higher then 0 and blanks. False if the value is actually 0 or blank).

How can I create this measure?

  • aj1973's avatar
    aj1973
    3 years ago

    The BLANK() function is considered as 0 as well.

     

    you can write this way also

    TrueOrFalse = IF(TABLE[Value] > 0 , "True" , "False")

4 Replies

  • aj1973's avatar
    aj1973
    Community Champion

    Hi Anonymous 

    TrueOrFalse = IF(TABLE[Value] <> BLANK() , "True" , "False")

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thanks aj1973 

      What if I wanted to include any '0' and any 'blanks' as a False?

      • aj1973's avatar
        aj1973
        Community Champion

        The BLANK() function is considered as 0 as well.

         

        you can write this way also

        TrueOrFalse = IF(TABLE[Value] > 0 , "True" , "False")

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

    I created a simplified pbix file(see the attachment), please find the details in it. You can create a measure as below to get it:

    Measure = IF ( SUM ( 'Table'[value] ) + 0 = 0, "False", "True" )

    Best Regards