FME dynamic filename
In the Navigator panel, find the Writer you want to change and edit the parameter "Destination Text File". Then you can edit the filename based on attribute value.
Even better, stop using classic Writers, use a FeatureWriter instead. Open the FeatureWriter and edit "Dataset:", which is more intuitive.
As noted in the other answer, you can do this with a FeatureWriter transformer.
But as an fyi, if you do want to do this in a standard writer, you would use the Fanout option. As you noted, you can't put an attribute into the Destination File name. But if you check the option for a Dataset Fanout, then you can put the information into there.
Here are some screenshots. The first embeds the datetime function into the Fanout Expression. The second uses an attribute. But see this item on the FME Community for the full info.