Pivot measure calculation
Hi
I have to calculate new column(measure2) in pivot table
column1 measure1 measure2 (calculation%)
1 100 (100/100)*100
2 50 (100/50)*100
3 25 100/25 ..
4 10 100/10 ..
5 5 100/5 ..
the numerator is always first row's measure (ex:100 from above table)
Let me know how to achieve this,
Thanks
Can you use the logic that you specified in the data model (query) to generate the required data and then use it in the pivot table? That would be the easiest way to do it. Tweaking the code to include the conditional logic/calculated measures is not going to be straightforward..
Thanks,
Bipuser
Similar Messages
-
I have been using PowerPivot for a couple of months now and whilst it is extremely quick when pulling in data to populate Pivot Tables, it is extremely slow to make the following kind of changes to the Data Model:
- Add a Measure / Calculated Field
- Add a Calculated Column
- Rename a Calculated Field
- Re-name a Calculated Column
- Modify a relationship
- Change a tables properties
- Update a table
In the status bar of excel I get a very quick 'calculating', then it spends a lot of time 'reading data',
then it 'finalises' after which nothing is in the status bar but it still takes approx. 45 seconds before the program becomes responsive again. This waiting time does not change depending on the action, it is the same if I rename a
column as it is if I add a new measure.
My question is what affects performance of these actions and how do I improve it?
To give you an idea of where my data comes from, I have:
- 7 tables that feed into the Data Model directly from within the workbook which contains the data model itself. These are a combination of static tables and tables that connect to a MySQL database.
- 6 separate workbooks which contain static data that is updated manually periodically (copied and pasted from another source)
- 5 separate workbooks which contain dynamic tables that are linked to our MySQL database and update when opened.
Now I realise that this is probably where my issue is, however I have no idea how to fix it. You do not seem to be able to connect to a MySQL database directly within the PowerPivot window itself so there is no way to generate and update tables without
first creating them either in a worksheet or separate workbook (as far as I know). If I try to create all of the tables directly within the single workbook containing the Data Model I get performance and crashing issues hence why I separate tables into
individual workbooks.
Any advice on how to improve performance would be tremendously appreciated. I'm new and keen to learn, I'm aware this set-up is far from best practice.
Hardware wise I am using:
- Windows 8 64-bit
- Excel 2013 64-bit
- Intel Core i7 processor
- 6 GB Ram
Thanks,
JamesDarren,
I think the point I was making is its in memory, geez... BTW what do all applications do when they run out of paged memory, if PowerPivot is using all available memory then wouldn't this force the other applications to use Virtual or essentially write
back and forth to the disks? I think Virtual memory white to disk ??, lol Also, there are parts if the architecture of Excel 2013 that when importing data into PowerPivot require memory and when working in SharePoint the PowerPivot data is cached to disk
unless recently refreshed... But this conversation isn't help the James who asked the question and as much as I would love to continue its become a little boring..
Hi James,
If you download one the ODBC MySQL Connectors
http://dev.mysql.com/downloads/connector/odbc/ and I believe yours is the first one for x64 systems and connect directly to the data you should be able to reduce the number of workbooks your opening and if you notice in the following graphic these
connection are automatically refreshed by default, the parts in red are the differences between PowerPivot 2010 and 2013
You should notice a lot of improvement especially when refreshing data please let us know how it goes...
After registering the ODBC Driver
Click Add. on the User-DSN sheet, choose the “MySQL ODBC 5.x driver”, fill in the credentials, choose a database (from the select menu) and a data source name and you’re done.
Back in Excel you go on the PowerPivot section of the ribbon and open the PowerPivot window (the green icon on the left side). In the ‘Home’ section of that window you will see a small gray cylindrical symbol (the international
symbol for “database”) which will suggest to you different data sources to choose from. Take the one where it says “ODBC”.
In the next dialog you click on create, choose the adapter, and then Ok. Back in the assistant you can check the connection and proceed.
Now you have the choice between importing the data from tables using the import assistant or Query depends on your skillset..
Cheers,
Ivan
Ivan Sanders <a href="http://www.linkedin.com/in/iasanders">My LinkedIn </a> , <a href="http://msmvps.com/blogs/ivansanders">My Blog</a>, <a href="http://twitter.com/iasanders"> @iasanders</a>,
<a href="http://shop.oreilly.com/product/0790145372703.do">BI in SP2013</a>, <a href="http://sharepointdemobuilds.codeplex.com">SP2013 Content Packs</a>. -
Change the Label of a measured calculation in AWM-Model view
Hello,
Is there a way to change the name of a Short or Long Label of a measured calculation in the AWM (Analytic Workspace Manager) without dropping & re-creating it?
In the Model view it does allow you to make the changes to the label in the text field, and it does prompt you to apply changes. I Selected OK. However when I exit out of the AWM & log back in... I saw the old name back in :). It was like the changes were not "committed".
Thanks!Hi
Thanks for your help, actually that option works for the total displayed as the latest row, I mean the label for the total row. However, for the total column, the name stays as the same as the measure label.
Can you further help me on the issue?
Thanks -
Data format in pivot table calculated item
Hi All,
I've got a pivot table with a dimension on rows and a dimension on columns and a measure. I have a "new calculated item" based on the dimension on the columns which does the following: ( ($2-$1) / ($1) ) *100
I want this calculated item shown as a percentage like 1,2% but the measure must stay a whole number like 1234 (no decimal places or percentage symbols) any suggestions on how to achieve this?
Thanks in advance!
GillesHi Kishore,
It is not helpful, I mean, it doesn't solve my problem. But nice post!
What I have is the following:
--------C1------C2-----C3
R1|--123--|--345--|--678--|
R2|--124--|--346--|--679--|
R3|--125--|--347--|--670--|
What I want is the following:
--------C1------C2-----C3---------calculated item
R1|--123--|--345--|--678--|--(($2-$1) / ($1) ) *100)
R2|--124--|--346--|--679--|
R3|--125--|--347--|--670--|
the column results must remain in the same format, but the calculated item must be in the format %9.99 (to see the percentage change)
any other suggestions? -
Hello ,
I have created a pivot table like below
________________________________ *200908 .... 200909 .... 200910*
No Matching data in A ........................ 500 ......... 550.............. 570
No Matching data in B ........................ 650 .......... 700 ............ 720
Now i want to calculate the difference for the latest month and prevoius month, and would like to display as below
__________________________________ *200908 ..... 200909 ....... 200910......... Diff*
No Matching data in A ........................ 500 ..............550 ........... 570 ..... 20
No Matching data in B ........................ 650 .............. 750 ........... 725 .....-25
I am getting the difference if i give static values like '200910' - '200909'
But i want to get the difference dynamically like 'highest date' - 'next highest date'
Please suggest some ideas.
Thanks in advance.
Edited by: user11049754 on Nov 18, 2009 12:48 PMhi abhi,
Do you mean moving the column position,if so your saying it as calculated item so in pivot view it would be in the measures area.From there where you want to move it??
My understanding from your question is that in the measure area if there is another column other than calculated item,you can move above it or below it.
By,
Kranthi. -
Using a string slicer value to filter measure calculations
Hi, I have 6 calculated fields that each provide a cumulative cost value for tasks in different categories. I would like to filter the total cumulative cost within one pivot chart to show only costs related to one project (out of a dozen or so).
I have a query which retrieves the project names, I have a relationship the costs and projects tables, however the measures will show me ALL project cumulative costs, and when I select each project name as a slicer value, only the X-Axis date range changes
to reflect the date range of the project. The cumulative costs remain the same, meaning the slicer value (project name) does not change the total cumulative costs in each category.
My formula for one of the calculated cumulative cost fields is below: (SumCapExAct is just
Sum([CAPEXACT]))
=IF (
ISBLANK ( [SumCapExAct] ),
BLANK (),
CALCULATE (
[SumCapExAct],
FILTER (
ALL(COSTS2) ,
COSTS2[DATE]
<= MAX ( COSTS2[DATE] )
Any Ideas on how I might have the selected Project Name filter the measures for each of my cumulative cost categories?
Thanks a million in advance!Try changing ALL(COSTS2) to ALL(COSTS2[DATE])
Then the filters on the other attributes should work.
hth, Imke -
Unit of Measure Calculation in Query
Hi,
I have a few calculated keyfigures in my query for example:
whats happening:
KEY 1= Standard Price * Qty A = Output in (LBS) Qty unit of measure
What I want is:
KEY 1= Standard Price * Qty A = Output in $
How can i fix that on the query level so that my output is in $
Thanks
Edited by: DANIEL GREEN on Jun 12, 2008 2:33 AMHi
change the target currency and conversion type.
--- Pravin -
Parent-child measure calculations
Hello guys
I have requirement about parent-child hierarchy.
Here is the example:
Head Office: 800 (sum up from its descendants)
1.Branch A 200
1.1 Reprentative Office A 100
2.Branch B 300
2.1 Reprentative Office B 150
2.1.1 Representative Office BB 50
Here is the situation, If i want to drill down from Branch A to Representative Office A so the measure of Branch A is original measure (200) and measure of Representative Office A is 100. and if i want to drill up to Branch A so the measure is sum up from Branch A and Representative Office A.
Any advice or best suggestions.Do a combine similar request.
One criteria for Branch, do appropriate group by in fx and second criteria for Rep office. Pivot it
Thanks
Aj -
Measure calculation based on hierarchy
Hi
I have flatten an account table to form a hierarchy of 5 levels, each level in this hierarchy will have a flag about account type,
So what I need now is a calculation which has to dynamically change according to this account flag object.
For instance, when account flag is u201CEu201D then the calculation should multiplied with minus. But I have 5 levels of hierarchy also with 5 account flags.
How can I consider these 5 account flags at a time to update the measure, is that possible in Web Intelligence?
I hope the following example for table structure can help to understand the problem.
Acct 1 flag1 acct2 flag2 acct3 flag3 acct4 flag4 acct5 flag5
AAA R AAf E AAD E AAD E VVv L
BBB R DDG E EFR R AAD L ERR R
CCC E FGF R DFS E SDD R FDF E
I have created the five levels accts and flags as individual objects in universe and using it in the webi report as follows,
Report:
Account ( drillable to 5 level) Calculate.measure
AAA 545464
BBB 1654546
CCC - 4674697
The above report should work in a way like when I drill down into account for the next level say. Acct2 , then it should check with corresponding flag (flag2 ) for its calculations (whether to add u2013 or + symbol)
Similarly on entering each level by drilling down, the calculation or formula should behave like above scenario, like it should check the flag and update the calculation
Is this possible ?
What kind calculation should I use ?
Thanks
DineshkumarThanks for the your time and response.we don't have a year range column i might need to create one in rpd wondering if there is a way to do it in the analyses directly. I created a year range in the analyses by writing a case statement in one of the year columns. As per your suggestion here i might not be able to use a yer range in the measure denominator By year range.
-
Sorting measures (calculated members) in SSAS cube designer
Hi,
In SSAS 2012 cube designer, on the "Calculations" tab I am writing some simple calculated members and displaying it in a folder (Display Folder=)
FolderA
am So this FolderA has the members as below :
[<-A1], [-A1], [A],
[A1], [A2], [A3], [A4], [A5],
and [>A5]
While I am browsing the cube from Excel 2007, this FolderA is deployed correctly along with the above measures. All fine till here.
However, while I expand FolderA, Sorting is not done correctly. It is displaying like below :
<-A1, >A5, A, A1, -A1, A2, A3, A4, A5
But I want it to be sorted correctly so that it looks good as below :
<-A1, -A1, A, A1, A2, A3, A4, A5, >A5
How to do this at cube level ? Any property or any work around (using the latest SSAS 2012 version)
Thanks
Hi Yvanlathem,
I am not talking about sorting of folders/subfolders.
I want to short calculated members within the folder
As my first post itself says, For ex.,
in FolderA
this FolderA has the members as below :
[<-A1], [-A1], [A], [A1], [A2], [A3], [A4], [A5], and [>A5]
However, while I browse cube and expand FolderA ; Sorting is not done correctly. Currently it is displaying like below :
<-A1, >A5, A, A1, -A1, A2,
A3, A4, A5
But I want it to be sorted correctly as below (After
use of this solve order keyword it should sort as per below):
<-A1, -A1, A,
A1, A2, A3, A4, A5, >A5 -
The Art of Pivoting: Measures
Hey experts,
My situation is as follows:
What I have: SSAS 2008 cube, users browsing the cube with pivot tables in Excel 2010.
My cube consists of (simplified for this example)
- 3 measures: revenue, cost, gross margin
- 1 dimension with 2 attributes: customer, customer group
My problem:
It is a MUST that the measures are organised in rows. Not in columns. So the Excel pivot table is supposed like this:
customer group 1 (-)
customer 1 customer
2
revenue $100 $200
cost $50
$80
gross margin $50 $120
As far as I know, there's no possibility to set this up server-side with SSAS? But there should be SOME way to achieve this by pivoting in Excel?
I found a similar thread here: http://social.msdn.microsoft.com/Forums/sqlserver/en-US/04fff713-f213-4554-997e-c729a6555225/with-excel-pivot-table-client-using-ssas-cube-how-to-change-the-measures-to-rows?forum=sqlanalysisservices
Unfortunately, I cannot find the "values" drop-down they have been talking about. Where exactly can it be found?
Any help would be greatly appreciated!Unfortunately, I cannot find the "values" drop-down they have been talking about. Where exactly can it be found?
Hi Mr_etl,
When clicking one of the cell in your Pivot table, the PivotTable Field List task pane
will appear on the right side, and there are for areas on the bottom of this pane,
Report Filter, Column Labels, Row Labels and
Values. For the detail informatiom about it, please refer to the link below.
How to Create a Pivot Table in Excel 2010
Regards,
Charlie Liao
TechNet Community Support -
Table Heading on Pivot Measure Labels.
Has anybody figured out how to get the TableName.ColumnName display setup on the measure labels when measure labels is in the Rows section of a pivot. I have a nicely laid out presentation catalogue and wish to display Table.Column rather than simply Column. Better still I'd like the table name as a separate field so i can format these differently.
I know the alternative may be re-structuring the data (ie use a 'Measure Type' dimension) but thats not possible currently.
Cheers
Alastairhmmm, thanks for that!
I ideally want seperate formatting on the tablename to the column. Might bribe a java guy next to me with some beer tokens to help me out with a narrative view. -
Data not retrieved in WebI with Measures calculated in Universe on SAPBW
Hi,
Pls share if such error is faced anywhere else and if there is any solution to this.
Environment: SAP BI 7.01 and SAP BO XI 3.1 SP2 FP2.9
Universe has calculated measures.
Problem: No data is fetched by WebI when both direct measures (straight from BEx) and calculated measures are used.
However, data is correctly retrieved if either only the direct measures are used or calculated measures are used.
Thanks!Good CKF parsed for you @ Universe.
If possible you can create Variable @WebI :
Var=[Grs Sales] + [Returns]
So that you can use it document (20 reports)
This way you can solves the issue as of now.
Gracias...!! -
How to get the measure total at row level for another measure calculation in DAX?
Hi There,
Using DAX, I am trying to get an expression for a calculated measure as follow:
So basically, I would like to get the AMeasure total highlighted in yellow in the A2Measure calculation:
Smeasure -(Ameasure total * WMeasure) where Ameasure total is the one highlighted.
I think my question would be how to get the total of a measure in order to used in the calculation of another measure.
Thanks and best regards,
JossHi Joss83,
If you're trying to get the result for [AMeasure] at the total level (i.e. 5.09 in your example) you can do this by creating a version of this measures that is evaluated after ignoring the filters (indirectly or explicitly) placed on
the 'Customer' and 'Player' columns. You may also need to ignore the filters place on some other tables or columns that must be ignored in order for the correct total to be returned.
Without knowing much more about your data model, I can only take a vague guess as to what this calculation would look like in your scenario:
AMeasureTotal:=
CALCULATE(
[AMeasure],
ALL(Customer[Customer]),
ALL(Player[Player])
You can read more about the 'ALL' DAX function here:
http://technet.microsoft.com/en-us/library/ee634802.aspx
Hope this helps,
Michael -
Hide rows in Pivot table Calculated Items in OBIEE 11g
Hi All,
I have requirement to show values in Pivot table such that values are divided into two sub totals and also shown in Grand Total.
For Sub Total 1, all the rows can be shown with Sub total value. But for Sub Total 2, only Total value is to be shown but not all the rows. How this requirement can be done?
I tried to hide the rows in Sub total 2, but its effecting entire table so those rows are removing from Sub total 1 aswell which should not happen.
Have look in below table for more clarity. My output should be as shown in Table 2 not as in Table 1.
Table 1:
Q1
Q2
Q3
Q4
Geography
Type
Asia
T1
100
200
300
400
America
T2
110
210
310
410
Europe
T1
120
220
320
420
SubTotal1
330
630
930
1230
Asia
T1
10
20
30
40
America
T2
15
25
35
45
Europe
T1
20
30
40
50
SubTotal2
45
75
105
135
Grand Total
375
705
1035
1365
Table 2:
Q1
Q2
Q3
Q4
Geography
Type
Asia
T1
100
200
300
400
America
T2
110
210
310
410
Europe
T1
120
220
320
420
SubTotal1
330
630
930
1230
SubTotal2
45
75
105
135
Grand Total
375
705
1035
1365
Any ideas how this can be done??
Thanks for your time.Hi,
Thanks for the reply.
Here Subtotal will sums up the rows basing on other column (Dimension).
SubTotal 1 sums the rows basing on the another dimension( value A and value B). SubTotal 2 sums the rows basing on aother values(values C and values C.
I understand the above solution, but that is not enough to my requirement as I need to show Regions for Subtotal 1, but not for Subtotal 2. And these Subtotals are based on another column (other than Regions).
Hope this is clear now.
Maybe you are looking for
-
How to edit the Title/Subject of a Mail?
Hai Everyone, I have a program which sends an email with an attachment (Selected rows in HTM Format). I am using the SO_OBJECT_REPOSITORY_MANAGER Function Module to send the Mail, my problem is i am not able to edit the Title/Subject of the Mail befo
-
Hi, I just bought a new adapter for my iBook G4 and now it doesn't charge the battery all the way anymore. My old power adapter ALWAYS charged the battery all the way up to 96%-100% (the reason I got a new adapter is because my old one was smoking an
-
Help reg. multipage form
Hi, I am doing a project in multipage form. I have found similar web application and it has been implemented in JSP. I have gone through the code.Not able to get it. The guy who implemented it is using one controller.jsp. when the user clicks back bu
-
Hi, Can we use Rman to backup the EBS 12i database. IS this recomended. Or is there any other method
-
TS1702 How do I remove a buddy in Poker Deluxe?
How do I remove a buddy from Poker Deluxe on iPad wifi 3? ?