Forum Discussion
User232431
1 year agoHelper III
Display dynamic selected value if value is missing
Hi , i am trying to show filtered text if it is missing. In above example if i select "USA" then i can able display concatination of "City" and "Value" if i select "UK" how can i display "Cit...
grazitti_sapna
1 year agoSuper User
Hi User232431, Your DAX function logic is close, but it needs refinement to handle missing values dynamically. Below is the updated DAX formula that checks whether the Value field has data or not for the selected City and returns the appropriate concatenation:
Cards_Val =
IF (
ISFILTERED(Sheet1[City]),
SELECTEDVALUE(Sheet1[City]) & " : " &
IF (
ISBLANK(AVERAGE(Sheet1[Value])),
"(Blank)",
AVERAGE(Sheet1[Value])
),
SELECTEDVALUE(Sheet1[City]) & " : (Blank)"
)
If I have resolved your question, please consider marking my post as a solution. Thank you!