Forum Discussion
How to set a default value for a text box ?
- 3 years ago
Sravyarajarapu don't write the formula there - write the measure separately in one of your tables like normal, then just reference the measure value in the text box. In your case, the measure would be something like:
mesaure name = SELECTEDVALUE('Table Name'[field name],"")
Hi Sravyarajarapu - by "text boxes", do you mean cards? If so, you could use something like ISFILTERED( ) or SELECTEDVALUE( ), depending on your situation. A measure like SELECTEDVALUE(Name","") will return the result of the specifed field (Name) if it has only one value (from you selecting a row), otherwise it will return blank.
No selection:
With selection
Does this work? Note that if that field ends up with a single value through some other method (a slicer, etc.), it will also return the name.
hello Sage Thankyou for your reply, I was actually referring to the text box, so if you could see the picture, the blng_date is the table visual and the bottom one is the text box visual and I have added the blng_date in the value. As of now I haven't selected any date in the table but by default the text box is picking the least date available. But if I click on any other date on the multiple dates available the text box date changes. So I wanted to have a default value like Empty in the text box when the date is not selected. Could you please help me with this. The text box filtered is available on the insert option in desktop
- RMDNA3 years ago
Solution Sage
You can actually reference the measure I suggested:
When published to the service, it looks like this:
No selection
Selection
Does that help?
- Sravyarajarapu3 years agoRegular Visitor
the isfiltered or the selected value is not working
- RMDNA3 years ago
Solution Sage
Sravyarajarapu don't write the formula there - write the measure separately in one of your tables like normal, then just reference the measure value in the text box. In your case, the measure would be something like:
mesaure name = SELECTEDVALUE('Table Name'[field name],"")