Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

What is the difference between Value and Selectedvalue?

  • Hi Anonymous 

    • VALUE attempts to converts a text to number. If success it returns the number if not it returns error
    • VALUES returns the distinct list of column available in the current filter context. So it generally returns a single column table but if this table contains one distinct value it will automatically convert it to a scalar value.
    • SELECTEDVALUE ( 'Table'[Column] ) = IF ( HASONEVALUE ( 'Table'[Column] ), VALUES ( 'Table'[Column] ) )

1 Reply

  • tamerj1's avatar
    tamerj1
    Icon for Community Champion rankCommunity Champion

    Hi Anonymous 

    • VALUE attempts to converts a text to number. If success it returns the number if not it returns error
    • VALUES returns the distinct list of column available in the current filter context. So it generally returns a single column table but if this table contains one distinct value it will automatically convert it to a scalar value.
    • SELECTEDVALUE ( 'Table'[Column] ) = IF ( HASONEVALUE ( 'Table'[Column] ), VALUES ( 'Table'[Column] ) )