Power Pivot Many to Many Relationship - excel

Please help.
Simply put I am trying to get the calculated column in table 3 to display the participation number from table 2. Need it to filter by name and date.
The formula in the calculated column is my attempt which doesn't work.
Any help or questions would be appreciated.

One way to do it would be:
=LOOKUPVALUE(Table2[Participation Num],Table2[Name],Table3[Name],Table2[Date],Table3[Date])

Related

USERELATIONSHIP in CALCULATE function returning wrong results

I am new to DAX and Power Pivot, I apologize in advance if there is a similar thread I did not see. I am using Excel 2016, I need to use USERELATIONSHIP in the CALCULATE function to use an inactive relationship in the data model (I need it for a slicer).
I am using this formula =CALCULATE([Count of Fiscal Week Identified],USERELATIONSHIP(Table[Fiscal Week Identified],Week[Week])) to create a calculated field I need to add to a pivot table.
I just need Excel to generate the pivot table on the left in the screenshot using a calculated field inserted in values, and the field 'week' in rows (having an inactive relationship in the data model). When I tried using the formula above, I get the table on the right which is completely different from the table on the left, and I cannot figure out why... I need this to include the pivot table in a slicer. Any help would be very much appreciated. Thank you in advance!
Regards,
The problem is that even though you are creating column using USERELATIONSHIP, the relationship isn't active when this column is evaluated in Pivot Table. So you need to use a Measure. Is the below the expected result?
If yes, then create a measure like this:

PIvot and Formula function to show unique plus multiple results

I've been racking my brain how to accomplish this but what I am trying to do is use a a pivot table to identify how many IDs only have the 1 skill and by which site.
I also want to show if they have more than one skill. For example they have Maths and Writing, by site.
I am also trying to do this via a formula.
Might sound a bit silly and i'm sorry but was hoping someone may be able to help.
I have shared my Google sheet showing this (i'm assuming I can do the same in excel).
https://docs.google.com/spreadsheets/d/1btkhhYyVG_GYrz_SYXwO4wUsxq3ay3eZv5AOF7h95o4/edit?usp=sharing
As per the sample data provided, it seems that the ID's have just one site, so showing the order ID\Site\Skills, therefore I would suggest the PivotTable layout below, adding a subtotal to count the quantity of skills per ID, remove the Grand Totals as they are not required.
You may also want to sort the Data by the Skills count in ascendant order to show first the ID's with just one skill.
So this is your PivotTable:
Another Layout:
You can do it in excel. Either you make a PivotTable and make something like this.
or you can just copy the ID, site and insert the skills like I have done in this picture.
Then use these formulas in the field. In the first column No Skills (Number of skills) I use the following formula: COUNTIF(A:A;F2) Where A:A are the first column ("ID") in your original table and then in the rest cells I use the following formula COUNTIFS($A:$A;F2;$B:$B;I$1) where A:A are the same as above and B:B is the second column "Skills" in your original table and I1 is the Skills in the new table..
Is this the result you want?
If so, it was just a matter of moving "Site" above "skill" under the Column section of the Pivot Table Editor. See below:

Excel pivot add field base on two other calculated fields

I added two columns to my pivot which calculates sums of hours like this :
I would like to add another column which is based on those two new columns, that calculates their quotient 'Sum of Avail Hrs'/'Sum of Eff Hrs' but couldn't find how to do it.
Please help!
Thank you
(There is a question asked a bit similar to my issue but there is no answer to it.)
You need to create a calculated field to do this.
In that pop-up box, you can create the formula you want.
Then add it to your pivot table.

Microsoft Excel get Count of Distinct Values

I am trying to use excel to get a count of distinct values, the following screenshot will illustrate what I am trying to do. Data Screenshot
Given data in the form on the left column I would like a way to display the occurrences of each distinct value on the right.
I have used the Outline Subtotal grouping to do this but it does not present the data in a form I can work with. I am by all means an Excel novice, any help would be appreciated
Thanks!
Use a pivot Table. Put the column in both the Rows and Values:

Microsoft Excel - how to show data on one column based off data in another column?

So I have this dataset in a separate worksheet here:
http://i.imgur.com/W3tEFjY.png
Answers to the following questions below should be in the Results worksheet, where I need to use formulas and/or functions. What would be a good formula for these questions?
Which Regions contain 6 or more Countries?
Which Region has the Highest Total of Vehicle Sales in 2014?
Which Regions have more Total Vehicle Sales in 2013 than in 2014?
Help greatly appreciated. Thanks!
For these you need to have a look at the VLOOKUP formula on Excel.
thats the only formula by which you can get such kind of stuff done easily,
VLOOKUP( value, table, index_number, [not_exact_match] )
for more help and examples on this formula please see
http://www.globaliconnect.com/excel/index.php?option=com_content&view=article&id=100:vlookup-function-in-excel&catid=78&Itemid=474

Resources