Counting rows that contain certain data across 3 collumns

%3CLINGO-SUB%20id%3D%22lingo-sub-1955782%22%20slang%3D%22en-US%22%3ECounting%20rows%20that%20contain%20certain%20data%20across%203%20collumns%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1955782%22%20slang%3D%22en-US%22%3E%3CP%3EI've%20tried%20to%20be%20very%20clear%20about%20what%20is%20being%20done%20and%20what%20has%20been%20tried%2C%20it's%20not%20a%20simple%20question%20so%20thankyou%20to%20anyone%20who%20is%20up%20for%20the%20challenge%20to%20help%20me%20tackle%20this%20problem!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'm%20trying%20to%20count%20data%20across%20collumns%20and%20rows.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3EHere's%20the%20scenario%3A%3C%2FSTRONG%3E%3CBR%20%2F%3EThe%20organisation%20I'm%20working%20with%20is%20a%20non-profit%20and%20wants%20to%20analyse%20their%20data.%20They%20can't%20do%20this%20from%20within%20their%20CRM%20system%2C%20so%20have%20to%20download%20it%20into%20Excel%20and%20then%20transform%20and%20analyse%20the%20data%20as%20follows.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAt%20the%20moment%2C%20a%20full%20activities%20report%20from%20their%20CRM%20of%20ALL%20activities%20between%20two%20dates%20is%20downloaded.%20(For%20an%20idea%20of%20scale%2C%20this%20is%20about%205%2C000%20rows%20and%2090%20collumns)%20(I've%20included%20a%20screenshot%20of%20the%20sample%20data%20for%20Outcome%201%20below).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThey%20are%20trying%20to%20then%20count%20the%20instances%20when%20certain%20Outcomes%20(there%20are%20about%2050%20Outcomes)%20are%20acheived.%20They%20need%20to%20count%20the%20number%20of%20activities%20(rows)%20AND%20the%20number%20of%20beneficiaries%20(unique%20values%20in%20one%20of%20the%20collumns)%20who%20have%20acheived%20that%20outcome.%3C%2FP%3E%3CP%3E%3CBR%20%2F%3EFor%20example%3A%3CSTRONG%3E%20Outcome%201%3C%2FSTRONG%3E%20is%20acheived%20when%3A%20Advice%20Given%20%3D%20Benefits%20OR%20Referred%20to%20%3D%20(Benefits%20OR%20housing%20support)%20OR%20Appointment%20attended%20%3D%20(GP%20OR%20Housing%20Support)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAt%20the%20moment%2C%20the%20raw%20data%20is%20transformed%20by%3A%3C%2FP%3E%3CUL%3E%3CLI%3ECreating%20a%20new%20collumn%20for%20each%20Outcome%20that%20needs%20to%20be%20reported%20on.%20This%20looks%20for%20the%20data%20that%20meets%20the%20outcomes%20criteria%20(e.g.%20new%20collumn%20created%20that%20searches%20in%20the%20'Referred%20to'%20collumn%20for%20'Benefits'%20and%20marks%20that%20activities%20with%20a%201%20if%20it%20exists.%20Then%20another%20collumn%20is%20created%20for%20'Referred%20to'%20collumn%20for%20'Housing%20Support'%20and%20marks%20that%20row%20with%20a%201%20if%20it%20exists%20etc.).%3C%2FLI%3E%3CLI%3EA%20further%20collumn%20(called%20Outcome%201)%20is%20then%20created%20to%20look%20across%20the%20new%20collumns%20and%20marks%20with%20a%201%20if%2C%20for%20that%20activity%2C%20one%20of%20the%20criteria%20is%20met.%3C%2FLI%3E%3CLI%3EA%20seperate%20sheet%20is%20then%20created%20to%20sum%20the%20outcomes%20(e.g.%20Number%20of%20activities%20with%20Outcome%201%20achieved%20AND%20the%20number%20of%20Beneficiary%20Names%20with%20Outcome%201%20achieved)%3C%2FLI%3E%3C%2FUL%3E%3CP%3EAs%20you%20may%20be%20able%20to%20guess%2C%20for%20all%2050%20Outcomes%20(each%20one%20looks%20across%203%20collums)%20this%20took%20a%20long%20time%20to%20build%20and%2C%20with%20all%20the%20collumns%2C%20it's%20really%20tricky%20to%20navigate.%20If%20anything%20changes%20in%20the%20raw%20data%20(e.g.%20a%20new%20collumn%20is%20added)%20it%20takes%20ages%20to%20re-structure%20the%20collumns%20to%20do%20that.%20The%20have%20asked%20me%20to%20look%20if%20I%20can%20do%20a%20process%20to%20make%20this%20more%20automated.%3C%2FP%3E%3CP%3ESolutions%20tried%3A%3C%2FP%3E%3CUL%3E%3CLI%3E%3CSTRONG%3EBuilding%20a%20Macros%20to%20do%20the%20data%20transformation%3C%2FSTRONG%3E.%20LIMITATIONS%3A%20the%20formulae%20would%20have%20to%20be%20hardcoded%20into%20the%20Macros%20which%20would%20mean%20if%20any%20additional%20fields%20are%20added%20or%20removed%20to%20the%20raw%20Civi%20data%2C%20the%20formulae%20would%20have%20to%20be%20re-edited%20in%20the%20Macros.%20At%20the%20moment%20don't%20have%20the%20skills%20to%20do%20this%2C%20so%20this%20would%20be%20quite%20unsustainable.%3C%2FLI%3E%3CLI%3E%3CSTRONG%3ECreating%20Pivot%20tables%20for%20each%20of%20the%20outcomes%20without%20transforming%20the%20raw%20data%20first.%3C%2FSTRONG%3E%20LIMITATIONS.%20I%20need%20to%20create%203%20pivot%20tables%20to%20look%20across%20the%203%20collumns%20(the%20pivot%20table%20filter%20is%20an%20AND%20rather%20than%20an%20OR%2C%20as%20far%20as%20I'm%20aware%20so%20I%20can't%20do%20it%20in%20one%20pivot%20table)%2C%20then%20use%20a%20lookup%20to%20see%20which%20individuals%20have%20met%20at%20least%20one%20of%20the%20field's%20criteria.%20This%20enables%20me%20to%20count%20Beneficiaries%2C%20but%20double%20counts%20the%20activities%20(e.g.%20if%20'Benefits'%20appears%20in%20more%20than%20one%20collumn%20on%20the%20same%20row%20it%20counts%20it%20twice).%3C%2FLI%3E%3CLI%3E%3CSTRONG%3ECountif%20on%20the%20raw%20data%3C%2FSTRONG%3E.%20I%20can%20make%20this%20work%20using%20a%20formula%20similar%20to%20%3DCOUNTIF('Raw%20Civi%20Data'!%24H%242%3A%24H%244500%2C%22Benefits%22)%20this%20counts%20activities%20but%20not%20unique%20contacts.%20I%20can't%20find%20a%20formula%20to%20help%20me%20count%20contacts.%20If%20anyone%20can%20suggest%20one%20that%20would%20be%20the%20BIGGEST%20help!!%3C%2FLI%3E%3C%2FUL%3E%3CP%3EAttached%20is%20a%20sample%20of%20the%20raw%20data%20how%20it%20appears%20in%20Excel%20(bear%20in%20mind%20I've%20only%20included%20data%20for%20one%20Outcome%20out%20of%20the%2050!)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CTABLE%20width%3D%22889%22%3E%3CTBODY%3E%3CTR%3E%3CTD%20width%3D%22132%22%3E%3CSTRONG%3EActivity%20Name%3C%2FSTRONG%3E%3C%2FTD%3E%3CTD%20width%3D%2277%22%3E%3CSTRONG%3EDate%3C%2FSTRONG%3E%3C%2FTD%3E%3CTD%20width%3D%22113%22%3E%3CSTRONG%3EBeneficiary%20Name%3C%2FSTRONG%3E%3C%2FTD%3E%3CTD%20width%3D%22189%22%3E%3CSTRONG%3EAdvice%20Given%3C%2FSTRONG%3E%3C%2FTD%3E%3CTD%20width%3D%22189%22%3E%3CSTRONG%3EReferred%20to%3C%2FSTRONG%3E%3C%2FTD%3E%3CTD%20width%3D%22189%22%3E%3CSTRONG%3EAppointment%20Attended%3C%2FSTRONG%3E%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3EBeneficiary%20meeting%3C%2FTD%3E%3CTD%3E03%2F01%2F2020%3C%2FTD%3E%3CTD%3EJane%20Smith%3C%2FTD%3E%3CTD%3EBenefits%2C%20Housing%20support%2C%20GP%3C%2FTD%3E%3CTD%3EBenefits%2C%20Housing%20support%2C%20GP%3C%2FTD%3E%3CTD%3E%26nbsp%3B%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3EBeneficiary%20meeting%3C%2FTD%3E%3CTD%3E04%2F01%2F2020%3C%2FTD%3E%3CTD%3EShamyla%20Aslam%3C%2FTD%3E%3CTD%3E%26nbsp%3B%3C%2FTD%3E%3CTD%3E%26nbsp%3B%3C%2FTD%3E%3CTD%3EBenefits%2C%20GP%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3EBeneficiary%20meeting%3C%2FTD%3E%3CTD%3E06%2F02%2F2020%3C%2FTD%3E%3CTD%3EJane%20Smith%3C%2FTD%3E%3CTD%3E%26nbsp%3B%3C%2FTD%3E%3CTD%3EHousing%20Support%3C%2FTD%3E%3CTD%3EHousing%20support%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3EBeneficiary%20meeting%3C%2FTD%3E%3CTD%3E04%2F03%2F2020%3C%2FTD%3E%3CTD%3EShamyla%20Aslam%3C%2FTD%3E%3CTD%3E%26nbsp%3B%3C%2FTD%3E%3CTD%3E%26nbsp%3B%3C%2FTD%3E%3CTD%3EBenefits%2C%20Housing%20support%2C%20GP%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3EBeneficiary%20meeting%3C%2FTD%3E%3CTD%3E05%2F05%2F2020%3C%2FTD%3E%3CTD%3EJane%20Smith%3C%2FTD%3E%3CTD%3EBenefits%2C%20Housing%20support%2C%20GP%3C%2FTD%3E%3CTD%3EBenefits%3C%2FTD%3E%3CTD%3E%26nbsp%3B%3C%2FTD%3E%3C%2FTR%3E%3C%2FTBODY%3E%3C%2FTABLE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHere%3Bs%20the%20criteria%20required%20for%20one%20of%20the%20outcomes%3A%3C%2FP%3E%3CTABLE%20width%3D%22328%22%3E%3CTBODY%3E%3CTR%3E%3CTD%20width%3D%22163%22%3E%3CSTRONG%3EOutcome%20achieved%20when%3A%3C%2FSTRONG%3E%3C%2FTD%3E%3CTD%20width%3D%22165%22%3E%26nbsp%3B%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3E%3CSTRONG%3EField%3C%2FSTRONG%3E%3C%2FTD%3E%3CTD%3E%3CSTRONG%3EField%20includes%3A%3C%2FSTRONG%3E%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3EAdvice%20Given%3C%2FTD%3E%3CTD%3EBenefits%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3EReferred%20to%3C%2FTD%3E%3CTD%3EBenefits%2C%20Housing%20Support%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3EAppointment%20Attended%3C%2FTD%3E%3CTD%3EGP%2C%20Housing%20Support%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3E%26nbsp%3B%3C%2FTD%3E%3CTD%3E%26nbsp%3B%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3E%3CSTRONG%3ERequired%20to%20Count%3C%2FSTRONG%3E%3C%2FTD%3E%3CTD%3E%26nbsp%3B%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3ENumber%20of%20beneficiaries%20who%20have%20achieved%20the%20outcome%20(unique%20count)%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3ENumber%20of%20activities%20where%20the%20outcome%20was%20achieved%3C%2FTD%3E%3C%2FTR%3E%3C%2FTBODY%3E%3C%2FTABLE%3E%3CP%3E%3CBR%20%2F%3EIf%20you've%20got%20this%20far%2C%20thankyou%20**SO%20MUCH**%20for%20taking%20a%20look%20and%20I%20hope%20you%20enjoy%20the%20challenge%20of%20helping%20me%20to%20find%20alternative%20solutions!%3C%2FP%3E%3CP%3EChloe%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1955782%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1956121%22%20slang%3D%22en-US%22%3ERe%3A%20Counting%20rows%20that%20contain%20certain%20data%20across%203%20collumns%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1956121%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F890989%22%20target%3D%22_blank%22%3E%40ChloeCI%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EOK.%20I%20realize%20the%20actual%20data%20includes%20real%20names%20of%20real%20people%2C%20so%20although%20I'm%20going%20to%20ask%20you%20to%20attach%20an%20actual%20file--the%20small%20representations%20in%20your%20initial%20query%20just%20don't%20suffice%20to%20grasp%20it%20all--I'm%20not%20asking%20for%20all%20the%20real%20data.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ETake%20a%20representative%20portion%20of%20the%20real%20data%2C%20all%20columns%2C%20for%20maybe%2010-20%20clients.%20Replace%20real%20names%20with%20those%20of%20Disney%20or%20Star%20Wars%20characters.%20Replace%20any%20other%20identifiable%20data%20(addresses%2C%20SSNs%2C%20emails)%20with%20nonsense%20data.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThen%20post%20that%20representative%20data%20set....and%20we'll%20see%20if%20we%20can%20make%20sense%20of%20it.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1958964%22%20slang%3D%22en-US%22%3ERe%3A%20Counting%20rows%20that%20contain%20certain%20data%20across%203%20collumns%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1958964%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F425987%22%20target%3D%22_blank%22%3E%40mathetes%3C%2FA%3E%26nbsp%3BCopy%2Fpaste%20does%20wonders.%20Creating%20the%20blue%20table%20took%20about%205%20seconds%20%3CLI-EMOJI%20id%3D%22lia_slightly-smiling-face%22%20title%3D%22%3Aslightly_smiling_face%3A%22%3E%3C%2FLI-EMOJI%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1958936%22%20slang%3D%22en-US%22%3ERe%3A%20Counting%20rows%20that%20contain%20certain%20data%20across%203%20collumns%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1958936%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F890989%22%20target%3D%22_blank%22%3E%40ChloeCI%3C%2FA%3E%26nbsp%3BI%20must%20admit%20that%20the%20description%20of%20your%20problem%20is%20so%20elaborate%20that%20it%20becomes%20hard%20to%20follow%20what%20you%20actually%20want.%20But%2C%20perhaps%20the%20attached%20file%20is%20a%20step%20towards%20a%20solution.%20I've%20taken%20your%20raw%20data%20into%20a%20structured%20table%20(blue)%2C%20loaded%20it%20into%20%22Get%20%26amp%3B%20Transform%20Date%22%20a.k.a.%20Power%20Query%2C%20and%20added%20columns%20for%20each%20of%20the%20outcomes%20where%20its%20originating%20column%20contains%20either%20of%20the%20relevant%20key-words.%20Then%20I%20cleaned%20it%20up%20a%20bit.%26nbsp%3BThe%20outcome%20is%20in%20the%20green%20table%20with%20some%20totals%20to%20calculate%20what%20I%20believe%20you%20asked%20for.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENote%20that%20I%20have%20used%20a%20relatively%20new%20functions%20FILTER%20and%20UNIQUE%20to%20count%20the%20unique%20number%20of%20beneficiaries%20in%20each%20column.%20Also%20added%20a%20record%20for%20%22John%20Doe%22%20to%20test%20the%20model.%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Screenshot%202020-12-05%20at%2014.17.19.png%22%20style%3D%22width%3A%20775px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F237995i2D04F1C0949E15E2%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Screenshot%202020-12-05%20at%2014.17.19.png%22%20alt%3D%22Screenshot%202020-12-05%20at%2014.17.19.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20this%20is%20not%20what%20you%20had%20in%20mind%2C%20it%20would%20be%20a%20good%20idea%20if%20you%20could%20manually%20create%20a%20table%20with%20the%20desired%20outcome%20for%20your%20example%20and%20share%20it%20here.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EFile%20attached.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Visitor

I've tried to be very clear about what is being done and what has been tried, it's not a simple question so thankyou to anyone who is up for the challenge to help me tackle this problem!

 

I'm trying to count data across collumns and rows.

 

Here's the scenario:
The organisation I'm working with is a non-profit and wants to analyse their data. They can't do this from within their CRM system, so have to download it into Excel and then transform and analyse the data as follows.

 

At the moment, a full activities report from their CRM of ALL activities between two dates is downloaded. (For an idea of scale, this is about 5,000 rows and 90 collumns) (I've included a screenshot of the sample data for Outcome 1 below).

 

They are trying to then count the instances when certain Outcomes (there are about 50 Outcomes) are acheived. They need to count the number of activities (rows) AND the number of beneficiaries (unique values in one of the collumns) who have acheived that outcome.


For example: Outcome 1 is acheived when: Advice Given = Benefits OR Referred to = (Benefits OR housing support) OR Appointment attended = (GP OR Housing Support)

 

At the moment, the raw data is transformed by:

  • Creating a new collumn for each Outcome that needs to be reported on. This looks for the data that meets the outcomes criteria (e.g. new collumn created that searches in the 'Referred to' collumn for 'Benefits' and marks that activities with a 1 if it exists. Then another collumn is created for 'Referred to' collumn for 'Housing Support' and marks that row with a 1 if it exists etc.).
  • A further collumn (called Outcome 1) is then created to look across the new collumns and marks with a 1 if, for that activity, one of the criteria is met.
  • A seperate sheet is then created to sum the outcomes (e.g. Number of activities with Outcome 1 achieved AND the number of Beneficiary Names with Outcome 1 achieved)

As you may be able to guess, for all 50 Outcomes (each one looks across 3 collums) this took a long time to build and, with all the collumns, it's really tricky to navigate. If anything changes in the raw data (e.g. a new collumn is added) it takes ages to re-structure the collumns to do that. The have asked me to look if I can do a process to make this more automated.

Solutions tried:

  • Building a Macros to do the data transformation. LIMITATIONS: the formulae would have to be hardcoded into the Macros which would mean if any additional fields are added or removed to the raw Civi data, the formulae would have to be re-edited in the Macros. At the moment don't have the skills to do this, so this would be quite unsustainable.
  • Creating Pivot tables for each of the outcomes without transforming the raw data first. LIMITATIONS. I need to create 3 pivot tables to look across the 3 collumns (the pivot table filter is an AND rather than an OR, as far as I'm aware so I can't do it in one pivot table), then use a lookup to see which individuals have met at least one of the field's criteria. This enables me to count Beneficiaries, but double counts the activities (e.g. if 'Benefits' appears in more than one collumn on the same row it counts it twice).
  • Countif on the raw data. I can make this work using a formula similar to =COUNTIF('Raw Civi Data'!$H$2:$H$4500,"Benefits") this counts activities but not unique contacts. I can't find a formula to help me count contacts. If anyone can suggest one that would be the BIGGEST help!!

Attached is a sample of the raw data how it appears in Excel (bear in mind I've only included data for one Outcome out of the 50!)

 

Activity NameDateBeneficiary NameAdvice GivenReferred toAppointment Attended
Beneficiary meeting03/01/2020Jane SmithBenefits, Housing support, GPBenefits, Housing support, GP 
Beneficiary meeting04/01/2020Shamyla Aslam  Benefits, GP
Beneficiary meeting06/02/2020Jane Smith Housing SupportHousing support
Beneficiary meeting04/03/2020Shamyla Aslam  Benefits, Housing support, GP
Beneficiary meeting05/05/2020Jane SmithBenefits, Housing support, GPBenefits 

 

Here;s the criteria required for one of the outcomes:

Outcome achieved when: 
FieldField includes:
Advice GivenBenefits
Referred toBenefits, Housing Support
Appointment AttendedGP, Housing Support
  
Required to Count 
Number of beneficiaries who have achieved the outcome (unique count)
Number of activities where the outcome was achieved


If you've got this far, thankyou **SO MUCH** for taking a look and I hope you enjoy the challenge of helping me to find alternative solutions!

Chloe

 

5 Replies

@ChloeCI 

 

OK. I realize the actual data includes real names of real people, so although I'm going to ask you to attach an actual file--the small representations in your initial query just don't suffice to grasp it all--I'm not asking for all the real data.

 

Take a representative portion of the real data, all columns, for maybe 10-20 clients. Replace real names with those of Disney or Star Wars characters. Replace any other identifiable data (addresses, SSNs, emails) with nonsense data.

 

Then post that representative data set....and we'll see if we can make sense of it.

Number of beneficiaries who have achieved the outcome (unique count) - Means ??

@ChloeCI I must admit that the description of your problem is so elaborate that it becomes hard to follow what you actually want. But, perhaps the attached file is a step towards a solution. I've taken your raw data into a structured table (blue), loaded it into "Get & Transform Date" a.k.a. Power Query, and added columns for each of the outcomes where its originating column contains either of the relevant key-words. Then I cleaned it up a bit. The outcome is in the green table with some totals to calculate what I believe you asked for.

 

Note that I have used a relatively new functions FILTER and UNIQUE to count the unique number of beneficiaries in each column. Also added a record for "John Doe" to test the model.

Screenshot 2020-12-05 at 14.17.19.png

 

If this is not what you had in mind, it would be a good idea if you could manually create a table with the desired outcome for your example and share it here.

 

File attached.

 

@Riny_van_Eekelen 

 

You're a good man, with a lot more patience...to take the time to create your own sample table here! Well done.

@mathetes Copy/paste does wonders. Creating the blue table took about 5 seconds