# 13.13 VALUES, SELECTEDVALUE आणि HASONEVALUE

Source: https://ravindrabagale.com/mr/powerbi/ch13-dax-data-analysis-expressions/13-13-values-selectedvalue-hasonevalue.html
Language: mr (Marathi with English technical terms)

VALUES(column): current context मधल्या distinct values ची table. Unmatched relationship keys साठी अतिरिक्त blank member लागू शकतो.

DISTINCT(column): distinct values; relationship मुळे तयार होणारा तो अतिरिक्त blank सदस्य देत नाही.

HASONEVALUE: नेमकी एक distinct value visible असेल तर TRUE.

SELECTEDVALUE(column, alternate): एक value असेल तर ती; नाहीतर alternate, default BLANK.

Categories Sold = COUNTROWS(VALUES(Product[Category]))

Selected City = SELECTEDVALUE(DarkStore[City], "All Cities")

Selected Platform = SELECTEDVALUE(Orders[Platform], "Blinkit & Amazon Now")

Dynamic Title = "Quick-Commerce Overview – " & [Selected Platform] & " | " & [Selected City]

City Check =
IF(HASONEVALUE(DarkStore[City]), VALUES(DarkStore[City]), "Multiple cities selected")

Selected City चं "All Cities" alternate हे example label आहे. प्रत्यक्षात दोन cities selected असल्या तरी तेच दिसेल; गरजेनुसार "एकापेक्षा जास्त cities" किंवा selection list दाखवा. Categories Sold example VALUES(Product[Category]) मोजतो; unsold categories filter बाहेर गेल्या आहेत का पाहा. नाव आणि metric definition जुळवा.

Dynamic title

Format › General › Title › fx › Field value मध्ये Dynamic Title measure निवडा.

रवींद्र बागले यांची tip

VALUES ला थेट scalar समजल्यास multiple-values error येतो. SELECTEDVALUE, HASONEVALUE किंवा अनेक labels साठी CONCATENATEX वापरा.
