Creating calculated items in powerpivot - powerpivot

I am trying to create a new row of data like the following:
Line item. Actuals
Total compensation 200
Net revenue 400
Net rev per total comp. 2
I used to be able to do a calculated item to do this in old pivot table but how do I accomplish in powerpivot? It needs to be a row calc not a column

If you are using a ssas cube then it is possible using the calculated member option where you can drag and drop line items (members) and divide which is pretty easy
Just connect to SSAS and Query --> Design in the upper menu you can find a calculator, clicking that you can achieve.
can you just elaborate on database used and excel version

Related

Data lookup based on measure

I am looking for some help in creating a measure to figure out data based on a ranking measure.
I have attached my Power BI file showing my issues and formulae.
https://www.dropbox.com/s/s7xted6lhh38dpo/Test.pbix?dl=0
Essentially, I have few tables that have been mapped. Showing revenue achieved by each employee for each product. The employees are split into 3 Teams.
I want to be able to rank these teams based on various filters that can be selected from one of the visualisations. – I have created the measure to do this using the below formulae:
Rev Measure = SUM(Sales[Rev])
Team Rank = RANKX(ALLSELECTED(Org[Team]),CALCULATE([Rev Measure]))
Now I want to create 2 card visualisation that dynamically fills in the data based on the ranking. So one card would read:
Commentary 1 = "Overall Sales was at $"& [Rev Measure] &". With the best performing Team being Team C bringing in $1220 of Revenue"
In the above commentary I am able to dynamically input the total revenue. However, I am unsure how to proceed with showing the best performing team data.
In the second card visualisation I want to show the worst performing team.
Any help on this would be greatly appreciated.
Thanks!

Sum-up and then calculate vs. calculate and then sum-up (SSAS-MDX)

I have a cube in SSAS multidimensional mode.
I have created a calculating measure in visual studio called "Total Cost". The formula is:
[Measures].[Unit Cost]*[Measures].[Qty]
It is in the lowest level of granularity (i.e. - the transnational level information has these fields).
The formula works well, as long as I present the data in this same level of granularity (for example, when I create a pivot and the rows are transaction IDs - like the source file)
However, when I present it in an aggregate format (for example - by customer) - then instead of making the calculation and then sum it up, it sum up and then calculate.
Here is what I expected:
Expected results vs. What I get
My understanding, that this is regardless a (correct/incorrect) hierarchy structure. In other words, I expected this calculation to work even without defining any hierarchy between the transaction ID level and the customer level.
I'd appreciate your help!
In your SSAS project ->datasource view, you need to add a named calculation. This would be "[Unit Cost]*[Qty]". Now add this named calculation as a Measure in your Cube. This do the job. This problem was already addressed in the following link.
https://stackoverflow.com/questions/53554284/how-to-multiply-two-measures-prior-to-aggregation/53558733#53558733

Tableau - Adding dimensions together to show overall revenue

I am very new to Tableau (first day user) and have been a long time Excel user. I am trying to fully understand the power of Tableau to eventually move away from Excel.
I have a question concerning dimensions and creating a calculated field.
My table has multiple categories and sub-categories. My goal is to display the total revenue and average order value per chosen sub-category (this seems easy enough).
I want to then take those sub-categories and show a combined sum of revenue and average of the average order value. I am stuck on trying to also combine these sub-categories to show a blended view.
Furthermore, the 2 sub-categories are weighted very differently. The average order value of 1 has a much heavier weight than the other and will definitely affect the AOV when combined. How do you also assign a weight to this combined total?
Any help will be much appreciated. I know this may be a rather simple solution but I am new to the program and am having difficulty finding this answer.
Tableau screen:
or
img1 http://postimg.org/image/dq5wqgnyl/
Best,
CR
Put sub categories in the rows column.
Put sum revenue in the text pill in the marks section
In the analysis tab on the top select column grand totals.
I'm unable to see your images,i hope this answers a apart of your question.

Microsoft Access Auto Rounding an Average Value from a query

I'm very new to Microsoft Access and I've run into a bit of a conundrum. I'm building a basic Access database that can help my Dad use past invoices to quote future jobs. I really only have two objects I'm working with. An invoice Table that hold all the costs that we paid for specific metals in 2013 and a Form I'm making that pulls information from that table. In my basic table I have a Currency field called PPLB(Price Per Pound). Now throughout the year we sometimes buy the same metal multiple times and if you know anything about metal, you know that the amount of metal you purchase sometimes affects the price that you pay. So in my Quoting Form I have a Query that looks like this->
SELECT DISTINCTROW Avg(MAT_QuickBookInvoices_2013.PPLB) AS [Avg Of PPLB]
FROM MAT_QuickBookInvoices_2013
GROUP BY MAT_QuickBookInvoices_2013.Material, MAT_QuickBookInvoices_2013.[Material Subtype], MAT_QuickBookInvoices_2013.Spec, MAT_QuickBookInvoices_2013.Shape, MAT_QuickBookInvoices_2013.Sizes
HAVING (((MAT_QuickBookInvoices_2013.Material)=[Forms]![MAT_QuoteTable]![Mat_CB]) AND ((MAT_QuickBookInvoices_2013.[Material Subtype])=[forms]![MAT_QuoteTable]![SubType_CB]) AND ((MAT_QuickBookInvoices_2013.Spec)=[forms]![MAT_QuoteTable]![Spec_CB]) AND ((MAT_QuickBookInvoices_2013.Shape)=[forms]![MAT_QuoteTable]![Shape_CB]) AND ((MAT_QuickBookInvoices_2013.Sizes)=[forms]![MAT_QuoteTable]![Size_CB]));
I know that's long but what it's doing is grouping the different type of metals into their most common grouping using Combo Boxes in the Quote Form and then finding the average price for that group. So now the problem. When I run the query it pulls up the correct price but when it transfers to the combo box it rounds price to the nearest whole dollar. How can I change or correct this? I've tried changing and formatting the source table as a double instead of currency and this hasn't helped. Any hints at all would be appreciated.
On the Property sheet for your comboBox, set the Formay property to Fixed. Then. immediately underneath that, set the number of decimals to 2 or 3 or whatever. That should do it.
Cheers -

SSAS 2005 put measures in the same folder in excel

I created a SSAS 2005 cube and connect to it from Excel 2007. I have a measure group sales. The key of the table is receipt no, line no. Now I create a new measure transactions, which is count distinct of receipt no. SSAS 2005 automatically assign the new measure in a separate measure group. The problem is in Excel, sales related measures are now in two measure groups (the sales and newly created one for the transactions). I find it a bit of awkward to go to these two folders to drag these measures since they are requested together a lot.
Is there a way to put these measures in same folder? I know there is a folder property for each measure in BIDS, but that will just create a new folder under existing folder for the measure group. Thanks.
One workaround would be to make your distinct count measure invisible, and to define a calculated measure in the calculation script that is just replicating this invisible measure, and setting its ASSOCIATED_MEASURE_GROUP to the name of the main measure group. The ASSOCIATED_MEASURE_GROUP property of a calculated measure is just use for display purposes, as far as I am aware.