How to Calculate the Proportion of Specified Data in a Row
Problem description & analysis
Below is an Excel file book1.xlsx:
There are seven numbers in each row, including numbers “1” and “2”. We are trying to find the proportion of number 1 in a sequence made up of numbers after the first “1” in each row. Below is the expected result:
Solution & explanation
Load add-in ExcelRaq.xll in Excel, and
Enter the following formula in cell H1: =esproc("=(?.pselect@a(~:1).len()-1)/(?.len()-?.pselect(~:1))",A1:G1). Write similar formulas in other cells to get results.
https://stackoverflow.com/questions/63771136/nuanced-excel-question-calculating-proportions
SPL Official Website 👉 https://www.scudata.com
SPL Feedback and Help 👉 https://www.reddit.com/r/esProc_Desktop/
SPL Learning Material 👉 https://c.scudata.com
Discord 👉 https://discord.gg/cFTcUNs7
Youtube 👉 https://www.youtube.com/@esProcDesktop
Linkedin Group 👉 https://www.linkedin.com/groups/14419406/