Skip to content
Discussion options

You must be logged in to vote

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.

using Dax.Analyzer.Ast;
using System.IO;
using System.Text.RegularExpressions;

int messageCount = 0;
List < string > extractedStrings =
   new List < string > ();

foreach(var measure in Model.AllMeasures)

{

   var messages = measure.GetCachedSemantics().Messages;
   if (messages.FirstOrDefault(
         m => m.Type == MessageType.Warning &&
         m.Message.…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@otykier
Comment options

@ricky7uio
Comment options

@otykier
Comment options

@ricky7uio
Comment options

Answer selected by ricky7uio
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants