Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

DAX Measure

I have a table like this

 

I wan't to show total in card for rent. And currently the rent column data type is in text. so I'm unable to create measure for this. Is there any way to create measure for this column.

 

  • Hi, Anonymous 

     

    Please try the following methods.

    Value = IF([Rent]="NULL",Blank(),[Rent])

    Is this the output you expect?

     

    Best Regards,

    Community Support Team _Charlotte

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

5 Replies

  • Anonymous , You can change datatype to number .

     

    or try a measure like

    sumx(filter(Table, Table[Rent] <> "NULL"), [Rent]*1 )

     

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      It getting an error like Cannot convert value 'NULL' of type Text to type Number

  • Syk's avatar
    Syk
    Resident Rockstar

    You will want to replace the typed "NULL" with actual nulls. Then you can convert the rent field to a decimal and create your measure! You can replace the values in Power Query Editor

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Currently I don't have access for data source

  • v-zhangti's avatar
    v-zhangti
    Community Support

    Hi, Anonymous 

     

    Please try the following methods.

    Value = IF([Rent]="NULL",Blank(),[Rent])

    Is this the output you expect?

     

    Best Regards,

    Community Support Team _Charlotte

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.