Bashir Saoudi Posted October 2, 2023 Share Posted October 2, 2023 In semiconductors we have situations whereby we measure something (say leakage) per pin. We end up with a table with multiple columns for those pins and rows for the number of dies we test. As the measurements for those different pins are the same, what is the best way to chart these columns quickly and neatly and colour by column name?I know that "line by" can do that, but only for categorical value. Can we use "line by" to show these columns even though they are not categorical?ThanksBashir Link to comment Share on other sites More sharing options...
Fredrik Rosell Posted October 2, 2023 Share Posted October 2, 2023 Hello Bashir,Would it be possible for you to provide a sample dataset? That tends to make it much easier to understand the use case.Best RegardsFredrik Link to comment Share on other sites More sharing options...
Bashir Saoudi Posted October 2, 2023 Author Share Posted October 2, 2023 Hi FrederikThanks for your message. I found how to do it partially. This is done by unpivoting the table and making all those columns name under one categorical column called "Categorical" and the measurements under another column called "Value". Once the table is unpivoted, the line chart is drawn by using on X the die number, on Y the "Value" and Line by "Categorical" and colour by "Categorical".Now the issue I have, is how to make Line By "Categorical" limit data to a specif rows. Let me explain with a small basic table.Categorical ValueAlan 20Andy 32Alex 60Bob 15Brian 11Ben 12As you can see in the Categorical, I have two groups. One starting with "A*" and the other with "B*". In my Line By and Colour By, how to writte the expression to limit the data to rows starting with "A" or "B"?Thanks for any supportBest regardsBashir Link to comment Share on other sites More sharing options...
Bashir Saoudi Posted October 2, 2023 Author Share Posted October 2, 2023 What I am trying to say above, is can we use wilde card "*" in expressions to limit the data. If so, how?ThanksBashir Link to comment Share on other sites More sharing options...
Fredrik Rosell Posted October 3, 2023 Share Posted October 3, 2023 Hello Bashir,If I understood the use case correctly, there are likely many different ways you can achieve that. In the example below, I choose to bin the Categorical column by substring (using the BinBySubstring function), in this example putting all values starting with the same first letter in the same bin (so one for A, one for B). <BinBySubstring([Categorical],1)>(There are many different ways to bin data) If you specifically want to write an expression, you could e.g. instead use the RXExtract function which uses regular expressions. To quote the manual:"RXExtract returns the part of a string (Arg1) that matches a regular expression (Arg2). Arg3 determines which match to use when there are multiple matches."Just extracting the first letter, giving the same result as the bins above, you could use:<RXExtract([Categorical],"^.",1)>Now we're doing this as part of the expression for your specific plot but depending on your use case, maybe this is something you could also do as a calculated column, so you simply create a new column with those binned values. Link to comment Share on other sites More sharing options...
Bashir Saoudi Posted October 4, 2023 Author Share Posted October 4, 2023 Hi FrederikThank you for the information. This would work if you base your selection on one character from the string.Instead, i was suggested to use following which has worked to:If [column] ~= ".*abc.*ef.*12.*",True,False) ==> this to select any string with this format *abc*ef*12*Thanks for your support.Best regardsBashir Link to comment Share on other sites More sharing options...
Fredrik Rosell Posted October 4, 2023 Share Posted October 4, 2023 Thank you for sharing that, Bashir! The ~= function is definitely quite useful, another tool in the toolbox, allowing for comparisons in if and case statements using regular expressions. I'm glad to have found a solution. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now