Forum Discussion
leneprd
7 years agoRegular Visitor
How to set default value
Hi, I want to know how to set default value. i have a table of names.. and i'm using a smart filter as search engine. When user search names, a name will be display in "card". But, in defaut mod...
- 7 years ago
hi, leneprd
You could create a measure like below:
Measure = IF(ISFILTERED(Table1[Names]),FIRSTNONBLANK(Table1[Names],Table1[Names]),"default value")
Then drag this measure into card instead of name field
Result:
don't select any nameselect one name
Best Regards,
Lin
Anonymous
7 years agoNot applicable
Create a measure that makes use of the HASONEVALUE or ISFILTERED functions. The logic would be something like "If Names is filtered then FIRSTNONBLANK of Names else "Default".
https://docs.microsoft.com/en-us/dax/hasonevalue-function-dax
https://docs.microsoft.com/en-us/dax/isfiltered-function-dax
https://docs.microsoft.com/en-us/dax/firstnonblank-function-dax
leneprd
7 years agoRegular Visitor
Sorry Ross73312 don't understand. I'm the beginner. If you can explain a bit detail, I appreciate it.
TQ