Repository navigation
Clean unused variables from measures #1278
|
Well, I love the new feature that highlights the unused variables in measures. I would like to create a script to at least increase the speed on which I can clean the unused variables in my model. I was provided this code some time ago by @otykier. This presents me the list of all the measures and the variable name. Is there any way to only delete that variable from the measure (programmatically, of course)? I have several measures to clean and I am looking for the smart way to clean them. Thank you!! |
Replies: 1 comment 4 replies
|
if anyone is interested, I created this simple solution, answering my own question. Hope it's useful also for someone. (tried in TE3). |
if anyone is interested, I created this simple solution, answering my own question. Hope it's useful also for someone. (tried in TE3).
You have to run it several times until you get 0 in the last message. This is because of nested variables. If they are unused, they will be marked as unused only when the previous one is deleted.