Hi,
I am trying to do the following but not sure how to approach. I have a cell that has a list of Y's and N's, and I want to change the cell to a percentage of Count(Y)/Count(X), while still keeping the Count(Y) as number.
For example I have the following data set.
Client | Y/N |
X | Y,Y,N |
Y | Y, Y |
Z | N |
A | Y |
I want the workflow to output the following:
Client | Y/N |
X | 66% (2) |
Y | 100% (2) |
Z | 0% (0) |
A | 100% (1) |
Appreciate any help, thanks!
Gelöst! Gehe zu Lösung.
Hey @salemalnahdi14, here's one way you can go about it. Please let me know if you're looking for something else!
If you're precious about the order of the Clients, just add a RecordID, pull it through and sort upon it just before the end like so:
Both workflows attached.
Here's how I would do it, looking for the total counts and count of Y then turn it into a string in the formula:
So you can do it in one formula which is pretty nice, hope this helps
ToString(Round((REGEX_CountMatches([Field1], 'Y')/REGEX_CountMatches([Field1], '[A-Z]')*100),2))+ '% ' +'(' + Tostring(REGEX_CountMatches([Field1], 'Y')) + ')'
Happy Alteryxing
Thanks this is very helpful!