Jump to content

Can you use "line by" for non categorical columns?


Bashir Saoudi

Recommended Posts

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?

Thanks

Bashir

Link to comment
Share on other sites

Hi Frederik

Thanks 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 Value

Alan 20

Andy 32

Alex 60

Bob 15

Brian 11

Ben 12

As 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 support

Best regards

Bashir

Link to comment
Share on other sites

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)

Bin.thumb.PNG.cf54760fb75391787c80f4cbca5ef4fa.PNG

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

Hi Frederik

Thank 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 regards

Bashir

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...