Extracting results based on multiple criteria.

Lost Paul
StarLounger
Posts: 93
Joined: 10 Oct 2019, 09:43

Extracting results based on multiple criteria.

Post by Lost Paul »

This one is a bit difficult to explain, but here goes.

We've got 2 tables that need to calculate results against each other.
1 is OK, as the data is 2-dimensional.
The other however has more going on.

Attached example file shows both the structure & sample data, on 'Starting data' tab.
With what I'm looking to produce to calculate against.

The filtering / criteria are;
* Starting data, column V = Y
* Month-Yr from in 'Hoped for result' row 3

I've used a partial Pivot to filter, but I cannot seem to get my head around how to produce the necessary result :brickwall:

Any ideas?
You do not have the required permissions to view the files attached to this post.

User avatar
HansV
Administrator
Posts: 78588
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Extracting results based on multiple criteria.

Post by HansV »

Can't you simply add the months you want to the pivot table?

S2379.png
You do not have the required permissions to view the files attached to this post.
Best wishes,
Hans

User avatar
hamster
StarLounger
Posts: 58
Joined: 10 Mar 2021, 22:57

Re: Extracting results based on multiple criteria.

Post by hamster »

you can do that via Power Query then Pivot

file updated, forgot about Live filter
You do not have the required permissions to view the files attached to this post.
Last edited by hamster on 06 Apr 2023, 20:04, edited 4 times in total.

snb
4StarLounger
Posts: 587
Joined: 14 Nov 2012, 16:06

Re: Extracting results based on multiple criteria.

Post by snb »

I don't see the problem.
No need for a second worksheet.
You do not have the required permissions to view the files attached to this post.

Lost Paul
StarLounger
Posts: 93
Joined: 10 Oct 2019, 09:43

Re: Extracting results based on multiple criteria.

Post by Lost Paul »

Ah, I thought I'd mess that up.

What we're trying to do is create a table that displays Demand Vs Capacity.
So that would be summarising the required project resources & minus off the allocated resources (people), in a single table.

Ideally, the user would select the first month-yr header, which would change the following 11 month headers & the results would change accordingly.

I'm sure there's still stuff I've missed, but hopefully you can get a better view of what I'm trying to achieve.

Updated file attached.
You do not have the required permissions to view the files attached to this post.

Lost Paul
StarLounger
Posts: 93
Joined: 10 Oct 2019, 09:43

Re: Extracting results based on multiple criteria.

Post by Lost Paul »

Sorted.

Quite convoluted; combination of pivot tables, Xlookups & Value

User avatar
HansV
Administrator
Posts: 78588
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Extracting results based on multiple criteria.

Post by HansV »

Congratulations!
Best wishes,
Hans

User avatar
p45cal
2StarLounger
Posts: 151
Joined: 11 Jun 2012, 20:37

Re: Extracting results based on multiple criteria.

Post by p45cal »

Lost Paul wrote:
06 Apr 2023, 12:54
Sorted.

Quite convoluted; combination of pivot tables, Xlookups & Value
Could you post your solution here? I was working on it, but couldn't get your hoped-for results, then I can see where I was going wrong and maybe offer a less convoluted solution…

Lost Paul
StarLounger
Posts: 93
Joined: 10 Oct 2019, 09:43

Re: Extracting results based on multiple criteria.

Post by Lost Paul »

Hi again,

Here's a rough example of my solution.
Highlighted in yellow are the changes.

In short, used a pivot to select the relevant data.
Then used VALUE & XLOOKUP to denote column count.
Followed up with VLOOKUP, using the previous column count.

HTH

Got an error attaching the file
Will try again in a bit

Lost Paul
StarLounger
Posts: 93
Joined: 10 Oct 2019, 09:43

Re: Extracting results based on multiple criteria.

Post by Lost Paul »

OK - try again

Nope; HTTP error :(

User avatar
DocAElstein
5StarLounger
Posts: 604
Joined: 18 Jan 2022, 15:59
Location: Re-routing rivers, in Hof, Beautiful Bavaria

Re: Extracting results based on multiple criteria.

Post by DocAElstein »

I had some similar issues once when uploading files or images, ( https://eileenslounge.com/viewtopic.php?f=12&t=31753 ), you might want to play around with the http or https showing in your Browser's URL bar when accesing the Lounge, that might help
( If at first you don't see any http or https showing on your Browser's URL at the start of the address, then copy the full address, paste it in Word or a text file, - that should reveal the full address you are using, including the first http or https bit, then change that first http or https bit, then copy and paste the modified address back in your Browser's URL bar )
Alan
I seriously don’t ever try to annoy. Maybe I am just the kid that missed being told about the King’s new magic suit, :(

Lost Paul
StarLounger
Posts: 93
Joined: 10 Oct 2019, 09:43

Re: Extracting results based on multiple criteria.

Post by Lost Paul »

Nope - no joy.

Got all sorts of IT issues here today.
Will try again later

Lost Paul
StarLounger
Posts: 93
Joined: 10 Oct 2019, 09:43

Re: Extracting results based on multiple criteria.

Post by Lost Paul »

Sorry - seems like I cannot attach file

User avatar
HansV
Administrator
Posts: 78588
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Extracting results based on multiple criteria.

Post by HansV »

The maximum file size is 250 KB.
Best wishes,
Hans

Lost Paul
StarLounger
Posts: 93
Joined: 10 Oct 2019, 09:43

Re: Extracting results based on multiple criteria.

Post by Lost Paul »

It's only 50KB

User avatar
HansV
Administrator
Posts: 78588
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Extracting results based on multiple criteria.

Post by HansV »

Weird. Could you email it to me (hans dot vogelaar at gmail dot com), then I'll try to attach it.
Best wishes,
Hans

User avatar
HansV
Administrator
Posts: 78588
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Extracting results based on multiple criteria.

Post by HansV »

Here is the workbook sent by Lost Paul.

ForEileen.xlsx
You do not have the required permissions to view the files attached to this post.
Best wishes,
Hans

User avatar
p45cal
2StarLounger
Posts: 151
Joined: 11 Jun 2012, 20:37

Re: Extracting results based on multiple criteria.

Post by p45cal »

re:"What we're trying to do is create a table that displays Demand Vs Capacity."

in the attached, pivot table based on a Power Query merge of the two source tables, only accounting for the 'Live' rows from each.
Currently probably showing the wrong stuff, but easy enough to change what it shows.
For each Project/Role combination and for each month, it's showing Requirement from the Project Data sheet, and %allocation from the Resource data sheet (It could (and/or) show a field called Resources which is just a count of rows from the Resource data sheet). It would be easy to subtract one from the other to show a shortfall either within Power Query or within the pivot table.

A slicer could be added to restrict which months show.
You do not have the required permissions to view the files attached to this post.