Wrong SSAS Grand Total Value Monthly Value base on Weekly Value
Dear All,
I Have calculated measures in my cube base on Weekly and Base on Monthly and different
Template Base .
For grand Total Weekly is fine but for Monthly is bad one.
Say calculated Measure Name "Weekly" with Syntax
CREATE MEMBER CURRENTCUBE.[Measures].[Weekly]
AS IIF(isempty([Measures].[Actual Quantity MTD]) or [Measures].[Actual Quantity MTD]=0 or isempty([Measures].[Original Plan Quantity MTD]) , null ,
IIF([Measures].[Original Plan Quantity MTD] =0 or isempty([Measures].[Original Plan Quantity MTD]),null,
IIF(
([Measures].[Actual Quantity MTD]-[Measures].[Original Plan Quantity MTD]) > 0 , 1 ,[Measures].[Actual Quantity MTD]/ [Measures].[Original Plan Quantity MTD] )))
The Result is good
here the picture
http://hpics.li/9fd22f2
https://drive.google.com/open?id=0ByY5H-XcydgiWGp0RzdWYWp0M2c&authuser=0
and for Monthly Calculation it was AVG of Weekly base on Time, Plant, and PSL Dimension
My calculated Monthly Measure Name "Monthly" with Syntax
CREATE MEMBER CURRENTCUBE.[Measures].[Monthly]
AS AVG (
DESCENDANTS([PSL].[PSL Description])*
DESCENDANTS([Plant].[Plant])*
DESCENDANTS([Finish Date].[Calendar],[Finish Date].[Calendar].[Month Year])
, AVG(([Finish Date].[Calendar].CURRENTMEMBER.CHILDREN), [Measures].[Weekly]))
The Result is Bad on Grand total
here the Picture link
http://hpics.li/5233b50
https://drive.google.com/open?id=0ByY5H-XcydgicEhtT1FpekRsbW8&authuser=0
Please help me why for the Result doesn't same. What do i Miss
Thank You
Yan
Hi Yan,
According to your description, you create a calculated measure in your cube, the problem is that grand Total for Monthly is incorrect, right?
In your scenario, the issue can be caused by that you used "*" and "/" in your calculated measure. In SSAS, one of the most common issues faced in mdx is grand total or sub total not coming properly when some arithmetic operations like
measure1 [* or + or - or /] measure2 is used, please refer to the link below to see the details.
http://vnu10.blogspot.jp/2011/01/mdx-grand-total-sub-total.html
Regards,
Similar Messages
-
Grand total values are not matching with Detail report
Report has grand totals and when I drill to the detail report, grand total values are NOT matching with parent report totals, I did some analysis but I'm clueless on this issue.
Please provide your thoughts and insight on this issue..
Thanksis your summary and detail reports hitting different facts, like summary hitting aggregate and detail report hitting it's corresponding detail level fact..?
if then,
From Front-end:
Fix the filter values in detail report that are passing from master report then try delete each columns then check the grand total. If you found your values is matching by deleting particular column then you need to investigate what is the issue around with that dimension table..
From Database side:
1. check first aggregate table has proper aggregate data of it's detail..
2. Take the detail report obiee generated query and try to comment each dimension table and it's corresponding joins to the facts, (before, this delete all the dimensional columns and other measures from select statement and put only that measure where you are getting wrong value, so that you need not to comment all the select and group by columns which saves your time.. ). Need to check by commenting each dimensional wid and it's table from clause, if you found that values is matching then there is some problem with wid columns data population in your ETL.
Is that BI-Apps project?
btw, whtz ur name? -
How to show Grand total values in Chart view....
Hi,
I have a crazy req. like i need to show grand totals values also on the chart view along with the normal metrics.
column Metric1 Metric2
AAA 10 20
BBB 30 15
CCC 20 15
TOTAL 60 50
so here i need the values 60 and 50 also also to be displayed in a line graph
cheersPretty simple to achieve :)
In your Pivot view, under Rows section where you have column dimensions like AAA,BBB etc...create a new calculated item say Grand Total with function as 'formula' and formula as sum(*). This will give you a new row with totals. Now Chart Pivoted Results and you are done.
Hope answered -
How to hide % measure column Grand Total value in Pivot View in obiee 11g?
Hi ,
I am facing a issue in obiee 11g .I am using a Pivot table to display the grand total of 3 metric columns eg: A , B, C out of which B is percentage so I need to remove the grand total value of the percentage column. We have to stick to Pivot View only. Anyone can sugest me on this?
Thanks ,
ShrutiMove B to rows section or cast to char in Criteria tab by keeping the B in Measures section only.
cast(B as char) -
Grand Total value displaying in all rows
Hi All,
I am facing issue with report data in one of my environment (OBIEE 11.1.1.6.2) ,
Let's say I have env1 and env1 with report A (Union Report)
In env1 the report is working fine.
Col1--------- Msr1---------Msr2
A---------------1-------------2
B---------------2-------------4
Subtotal-----3-------------6
D--------------10------------1
E--------------10------------2
Subtotal ----20-----------3
Grand Total-23-----------9
the same report in env2,
Col1--------- Msr1---------Msr2
A----------------23------------9
B----------------23------------9
Subtotal------23------------9
D---------------23------------9
E---------------23------------9
Subtotal -----23-----------9
Grand Total--23-----------9
The grand total value is repeated instead of row value in env2.
I tried moving the reports around the environments but no use, I believe some enviornment level setting is the reason for this issue. (I have few more environments everywhere it is working fine like env1, the only problem is with env2).
Could anyone give some suggestions.
Thanks,
VinoIt is happening because of RPD corruption.
Copied physical, bmm and presentation layer from env2 to env1 then same issue started occuring in env1.
the following things worked,
1) Created a new bmm and SA in env1 from env2 physical model, this worked fine.
2) Copy the BMM from env2 to env1 - Let say BMM1
Now recopied the BMM1 in the logical layer of env1 and rename it as BMM2 this also worked fine.
Looks like the BMM layer was corrupted, don't know the reason why it happened..
Thanks,
Vino -
*urgent* Alternate colors for Grand total values
Hi all,
I have 1 dimension column and 4 fact columns. Here I perform Grand total for the request .
The requirement is :---
I need alternate colors as background for the Grand total values.
Am trying to modify the XML in Advanced tab .
I tried to do it by using combine request .
Please help on this . Urgent .
Thanks a lot in advance for every reply .Please give some suggestions.
-
Alternating colors for grand total values
hii
i hve a requirement that grandtotal values should be displayed in alternate colors..actualy grand total values be in blue..bt i need the alternate colors for the values of grand total..pls help me regarding this..Please give some suggestions.
-
Presentation Hierarchy Grand Total Values
Hi,
We have the following scenario,
Hierarchy Product A is created for Dimension Product A
Hierarchy Product B is created for Dimention Product B
Fact Product Measures is joined to Store Dimension , Dimension Product A, Dimention Product B and Fiscal Calendar
Dimension Product A contains subset of Products that are existing at Fact
Dimention Product B contains subset of Products that are existing at Fact
and some products can exists both at Dimension Product A and Dimension Product B
The issue we are facing is, when ever report is created using One of the Product Hierarchy and Fact. Product Sales (default aggregation is sum),
the grand total level is showing sum of all Product Sales. It is not limiting to Products that are in Product Hierarchy selected in the report.
But the sub levels are limiting based on selected Product Hierarchy which is causing not matching the roll up amount to grand total.
Is it possible to limit the grand total level value of Presentation Hierarchy based on selected Product Hierarchy.
Does anyone face similar issue.
Thanks in Advanceis your summary and detail reports hitting different facts, like summary hitting aggregate and detail report hitting it's corresponding detail level fact..?
if then,
From Front-end:
Fix the filter values in detail report that are passing from master report then try delete each columns then check the grand total. If you found your values is matching by deleting particular column then you need to investigate what is the issue around with that dimension table..
From Database side:
1. check first aggregate table has proper aggregate data of it's detail..
2. Take the detail report obiee generated query and try to comment each dimension table and it's corresponding joins to the facts, (before, this delete all the dimensional columns and other measures from select statement and put only that measure where you are getting wrong value, so that you need not to comment all the select and group by columns which saves your time.. ). Need to check by commenting each dimensional wid and it's table from clause, if you found that values is matching then there is some problem with wid columns data population in your ETL.
Is that BI-Apps project?
btw, whtz ur name? -
Condition value of Tax gets wrongly added to Total value of Contract
Hi All,
I'm currently investigating an issue where there are 2 line items in an SAP Sales Contract. There is a human error in the second line where the billing end date is less than billing start date in the billing plan. Consequently, the second line has null Outgoing target value.
However, the header Total value in the Contract gets wrongly calculated as Basic condition value of 1st line + Condition value of tax condition type of line one due to this. When I modify the billing end date for the second line item to be a date greater than the billing start date, the above problem disappears and the total value of the contract does not include the tax component.
For eg.
Normal Error free Contract
Total Value at Header = 700.00 EUR
Material Outgoing Target val
Item 0010 MAT1 450.00 ( 450 + 50 (tax ) )
Item 0020 MAT2 150.00
Contract with billing plan error in second line
Total value at Header = 550.00 EUR
MAterial Outgoing target val
Item 0010 MAT1 450.00 ( 450 + 50 (tax ) )
Item 0020 MAT2 0.00
Any inputs would be most welcome.
Regards,
Venkatesh.Got the solution by making the condition type as manual.
Thanks.
Dhruba -
Hiding grand total value in pivot table view
Hi,
I have a pivot table in which i have 5 measures, out of these 5 measures i want to show the grand total for only the first one. How can this be done?
Thxhi Phantasm, do as it is mentioned as kart.
IT WORKS FINE, put agrregation rule as none and take row total as after.........
take aggregation rule as NONE for last 4 columns ok......
TRY NEATLY ONCE..........IT WORKS
Thanks & Regards
J Rushi -
Hi all,
Is there any documentation over there with SSAS total behavior?
When you explore the data is there any way to change the grand total behavior?
As you can see in the "cantidad" measure, it shows the total by sum() of all the values.
"% dto linea" its a calculated member and it does average.
"importe total pedido" should be 4200 instead of 23275,31.
I think we need SCOPE() but not sure how to implement it.
As usually, thanks a lot for your helpHi Chris:
I´ve been trying something but it dodnt work.
I want to do the following:
Purchid its the order Id (pc-13/00473)from purchtable, estado its status but from inventTransTable, and recid it´s the recordID as shown in the first screen capture.
In the first screen capture shows 7.5 for "discount %". I want it to show 10.
The screen shows discount % by purchtable."order no.", inventtrans."transaction status", inventtrans."recid".
the values are stored also in inventtrans table, it´s filled by a join with several tables.
A purchline can hold several transactions.
In this case, I want to grand total 10 for discount%, not 7.5 (30/4 it´s what the cube is doing) or 40.
For "importe total pedido" (total order amount) column I´d like to show 4200 instead of 23275.31.
how could I do this?
i´ve been trying this, but it doesnt work.
the calculation was PL_LINEPERCENT (from inventrans, it´s also a fact. table)/ (number of rows count measure)
SUM(
DESCENDANTS([PurchTable].[PURCHID].CURRENTMEMBER,[PurchTable].[PURCHID])
AND
DESCENDANTS([InventTrans].[Estado].CURRENTMEMBER,[InventTrans].[Estado])
AND
DESCENDANTS([InventTrans].[RECID].CURRENTMEMBER,[InventTrans].[RECID])
[PL LINEPERCENT]/[Recuento Fact Invent Trans])
thanks a lot! -
SSAS -- Grand Total is not returning by the calculation
Hi All,
Good Day..!!
Need help on the below scenario.
I have implemented small aggregation based on the time dimension using the scope .. but when browsing through excel , it is not giving the grand total ..
Create Member CURRENTCUBE.[Measures].Aggre_gate
As
Null;
SCOPE([Measures].Aggre_gate);
[Measures].Aggre_gate =
SUm( VisualTotals(
PeriodsToDate(
[Date].[Calendar].[Calendar Year],
[Date].[Calendar].CurrentMember
[Measures].[Internet Order Count] )
End Scope;
Please help me , what went wrong here ..
Thanks
Mahesh AlamHi M,
It might be your use of VisualTotals, if there is a nonrelated dimension in the query. ie Applying
the VisualTotals function
to dimension members that are not related to a measure or are under the measure group granularity will cause values to be replaced with null.
Is there a reason why you are using VisualTotals?
Richard -
Formulated Grand total as percentage value
Hi,
Here is my sample data
Val1 Val2 Percentage( Val2/Val1 )
59 16 27%
19 4 21%
78 20 26% (now instead of getting 26% i'm getting 48%). How to get formulated grand total value based on previous two columns ?
ThanksTry this: on your Percentage column, change the aggregation rule to "server complex aggregate."
-
Hi,
I found it is wrong for grand total of measure / calculated field? Here is my sample and data:
Here is the data:
TotalForecast:=CALCULATE(SUM([Qty]), Table1[Data Type]="Forecast")
TotalSales:=CALCULATE(SUM([Qty]), Table1[Data Type]="Sales")
Diff:=[TotalSales]-[TotalForecast]
ActualDemand:=if([Diff]<0,[TotalForecast],[TotalSales])
Is there something wrong for my expression?
Thanks
WilsonThe "problem" is that measures actually calculate individually for each cell in a pivot. What that means is that technically the grand total row in a pivot is not related to the rows above it. Intuitively, it seems like it is related
because often times the grand total is what you expect. This can be a little confusing at first but there are some blog posts out there that do a good job of explaining the concept.
Your current measure is looking at the Diff only as it pertains to the grand total row. It sees 9 and therefore returns the value of TotalSales.
The quickest fix is probably just to add one more measure that forces your current measure to evaluate itself in the proper context:
ActualDemand2:=
SUMX(
VALUES(Table1[Product Type]),
[ActualDemand]
In PowerPivot functions that end in "x" are called iterators. They let you change the granularity of a calculation by cycling thru the individual rows of a table you specify.
In this case, the table I am using is VALUES(Table1[Product Type]), which is a single column table containing the unique values of the Product Type.
Now your measure evaluates the sum for each Product Type (which ends up being the 4 results showing in your pivot table above for each Product) and adds those 4 results together for Grand Total. -
Hi,
I have a Report for GL Reconciliation and it shows Source System Balances and GL Balances along with the Variance in these two and % Variance.
Sample data is as follows:
Year Month SYS Source System Bal GL Balances Variance % Variance
2010 MAY A 66,100,676,002 60,994,246,811 -5106429191 -8.37%
2010 MAY B 29,081,192,665 29,066,650,415 -14542249.78 -0.05%
2010 MAY C 218,856,115 212,416,688 -6439426.71 -3.03%
2010 MAY D 14,601,939 -100.00%
2010 MAY E 808,716,681 822,453,990 13737309.05 1.67%
2010 MAY F 5,874,200,259 6,856,456,401 982256141.3 14.33%
2010 MAY G 2,181,160,124 2,164,379,222 -16780901.26 -0.78%
2010 MAY H 10,505,609,797 23,529,905,894 13024296097 55.35%
2010 MAY I 1,566,030,457 1,565,502,039 -528418.48 -0.03%
2010 MAY J 1,479,284,089 100.00%
2010 MAY K 10,939,680,559 7,481,930,011 -3457750548 -46.21%
2010 MAY L 8,774,737,817 8,831,160,339 56422521.84 0.64%
2010 MAY M 1,117,717,954 548,331,847 -569386106.3 -103.84%
2010 MAY N 73,670,961 55,680,430 -17990531.39 -32.31%
2010 MAY O 4,583,263,229 4,562,122,752 -21140477.19 -0.46%
2010 MAY P 204,382,965 206,288,734 1905768.97 0.92%
2010 MAY NULL 332,763,879 100.00%
MAYTotal 142,044,497,524 148,709,573,543 6665076018 4.48%
Now This is how the Report will work as Normal...
What the user wants is Instead of Variance he wants to see the Absolute variance. So If I run absolute function on This Column, I will get following results:
ABS(Variance)
5,106,429,191
14,542,250
6,439,427
13,737,309
982,256,141
16,780,901
13,024,296,097
528,418
3,457,750,548
56,422,522
569,386,106
17,990,531
21,140,477
1,905,769
6665076018 --- -This Total is Incorrect as it is showing only the Absolute value to the Total, where as it should be More than this and to achieve this, I changed the Aggreegation Rule to SUM
to Get the correct sum of the figures mentioned ablove which will show following output:
ABS(Variance)
5,106,429,191
14,542,250
6,439,427
13,737,309
982,256,141
16,780,901
13,024,296,097
528,418
3,457,750,548
56,422,522
569,386,106
17,990,531
21,140,477
1,905,769
23,289,605,688
Now Till this point everything is correct and can be achieved. The problem is with the % Variance:
Bydefault % Variance ( Calculated using Variance/GL Balances )*100 Is as follows:
% Variance
-8.37%
-0.05%
-3.03%
-100.00%
1.67%
14.33%
-0.78%
55.35%
-0.03%
100.00%
-46.21%
0.64%
-103.84%
-32.31%
-0.46%
0.92%
100.00%
4.48%
But the Users wants that The % variance be calculated on Variance Column and GL Balances Column ( Variance/ GL Balances)*100
But the Grand Total values at the bottom should be based on ( Grand Total of ABS(Variance)/ Grand Total of GL Balances ) *100
to get the Desired results as :
% Variance
-8.37%
-0.05%
-3.03%
-100.00%
1.67%
14.33%
-0.78%
55.35%
-0.03%
100.00%
-46.21%
0.64%
-103.84%
-32.31%
-0.46%
0.92%
100.00%
15.66%
(23,289,605,688/1,48,709,573,543)*100
If someone can help me with this...
Edited by: help-required on Oct 1, 2010 1:14 AMOK, there are a couple of things that have to be pointed out before getting to the actual problem. First of all, the column you named "Variance" is not a variance, but a "difference" and should be labeled as such. Second, what is the variance you are trying to calculate?
If the variance is from the "Source System Bal," then the calculation is ("GL Balances" - "Source System Bal")/"Source System Bal"
If the variance is from the "GL Balances," then the calculation is ("Source System Bal" - GL Balances")/"GL Balances"
You have ("GL Balances" - "Source System Bal")/"GL Balances" so do you know what you are measuring? Make sure you get this part right first. Now on to the issue itself.
This is the point of confusion with some I think: you want the individual rows of the "% Variance" column to display the +actual+ variance, positive or negative, but in just the total at the bottom, you want the "% Variance" to reflect the "absolute values of the differences, summed, and then divided by the GL Balances."
You can't have two different calculations on the same column like that, one for the rows and a completely different one for the total.
Here's a workaround. Uncheck the "totals" for the pivot table completely and just show the rows. (Make sure you change the name of the "Variance" column to "Difference" or something similar.)
Now create another pivot table view, but take out all the attributes so the measures sum up. Add an additional column called "ABS % Variance" and make this calculated column (do this in Criteria in the fx of a "dummy column"):
(ABS("GL Balances" - "Source System Balances")/"Source System Bal")*100.00
Don't forget to change the data format to "percentage."
Now place this pivot table view directly below the one with the individual rows. You should now have what you are looking for.
Edited by: David_T on Sep 30, 2010 10:58 AM
Maybe you are looking for
-
I want to store/play music from a NAS drive is this possible?
I have iTunes 10.3.1 on my iMac and can broadcast around the house over my Airport Extreme to my two Airport Expresses. Remote app works great. Now I want to store music on a NAS drive in the hope I can use that as a server to avoid having to keep
-
Error on startup, Any of you experts want to help?
Hey guys, Ive had itunes on my computer for a few monthes now and its been working fine, but yesterday i decided to upgrade to the latest version. Now, Im getting an error when I start iTunes that says itunes has encountered a problem and needs to cl
-
Control-C in SQL*Plus on Windows
Hi, I use the "command-line-looking" sqlplus.exe (not sqplplusw.exe) Client version 10.2.0.1.0 on my Win-XP PC. An annoying "feature" of this SQL*Plus, is that it closes when I press ctrl-c. For example, when a multiple-lines output is running in the
-
is it possible if we want to send a message or image to particular device token if it is possible then how ?
-
How to connect java with database without any dsn.
is there any way to connect java with database with out creating any dsn..like we do in ado in vb by providing provider.