When is a dimension memeber a calculated member?
Hey folks,
I created some master data., but I can't see (yet) any logic, if a member is a calulated member (in refernece to master data table, Flag "Calculated member").
When is this set to N, when to Y?
How can I influence/change this?
Thanks in advance!
Christian
Thanks for the reply. So far, this was my opinion, too.
But, I have the following hierarchy:
ID EVDESCRIPTION PRODGRP SCALING PARENTH1
ALLPROD
MUSTARD Mustrad Food ALLPROD
KETCHUP Kecthup Food ALLPROD
MAYONAISSE Mayhonnaise Food ALLPROD
BROOM Broom Household ALLPROD
MOP Mops Household ALLPROD
DUSTPAN Dustpans Household ALLPROD
In my opinion, the 6 entries (MUSTARD-DUSTPAN) are non-calculated members. Dimension member ALLPROD is a calculated member.
But when I had a look into master data table I saw, that the calculated member-flag for ALLPROD is N as well, which needs to be Y in my opinion.
ALLPROD EN N H1
BROOM EN N H1 Household Broom
DUSTPAN EN N H1 Household Dustpans
KETCHUP EN N H1 Food Kecthup
MAYONNAISE EN N H1 Food Mayhonnaise
MOP EN N H1 Household Mops
MUSTARD EN N H1 Food Mustrad
Why is the calculated-member-flag for ALLPROD = N, as ALLPROD is the root-Element of alle Products?
Any further help is appreciated.
Best Rgds,
Christian
Similar Messages
-
MDX Query to Calculated member
Hi All,
I have a MDX query which works fine, when converting the query to Calculated member, I get the same result for all the rows of a dimension.
select {[Measures].[Contents]} on 0,
([Dim Products].[Product Alias].[Product Alias].members,
(filter ([Dim Products].[Product ID].members,
instr(left([Dim Productss].[Product ID].currentmember.member_Key,3),'112')>0))) on 1
from
<<CubeName>>
Calculated Member:
SUM(filter ([Dim Products].[Product ID].members,
instr(left([Dim Products].[Product ID].currentmember.member_Key,3),'112')>0),[Measures].[Contents])
When I drag the dimension product, the calculated member showing the same result for all the products. Can anyone let me know the syntax error here.Hi SQL GUN,
For me it works :
WITH MEMBER [Last3MonthsInternetSales] AS
AGGREGATE
LastPeriods(-3, ClosingPeriod([Date].[Calendar].[Month], [Date].[Calendar].[Month].&[2005]&[12])),
[Measures].[Internet Sales Amount]
SET MySet AS
{[Date].[Calendar].[Month].&[2005]&[09],
[Date].[Calendar].[Month].&[2005]&[10],
[Date].[Calendar].[Month].&[2005]&[11],
[Date].[Calendar].[Month].&[2005]&[12],
[Date].[Calendar].[Month].&[2006]&[01],
[Date].[Calendar].[Month].&[2006]&[02]}
SELECT
[Measures].[Internet Sales Amount],
[Last3MonthsInternetSales]
} ON COLUMNS,
MySet
} ON ROWS
FROM [Adventure Works]
Are u sure your query is correct. I think you might have a [Fiscal Month Num of Year] too much in your (). I'm not sure, but are u dragging the correct level of hierarchy ? Also in the part ON ROWS you seem to take a lot of levels with you.
Why for example take .allmembers when you only want the actual last 3 of your currentmember?
Can u check again? -
Help in creating MDX Calculated Member using attributes from multiple Dimension
Hi All,
First of all my knowledge on MDX is basic. In one of our projects, there is a requirement to create calculated member (similar to derived fields in SQL) which is more of a dimension attribute and not really a calculated member. Due to IP issues I cannot paste
the actual queries but I will provide an SQL Query equivalent to what I am trying to achieve:
Select P.Product, Case When ISNULL(FS.ArtistName,'') = '' Then P.ArtistName Else FS.ArtistName End Artist
From
dbo.FactMusicSales FS
Join dbo.dimProduct P
on P.DimProductKey = FS.DimProductKey
We are trying to replicate the logic for derving the "Artist" field using MDX script.
We are running into issues while trying to build an MDX expression using the above logic. The main issue being that the new field/member "Artist" would not be calculated unless its elements are selected (FS.ArtistName, P.ArtistName). Besides this
we are also unable to place this new member in a different folder other than a sub folder under the measures. Any pointers to solving this would be really helpful.
Thanks in Advance,
VenkiHi Venki,
According to your description, you need to create calculated member (similar to derived fields in SQL) which is more of a dimension attribute and not really a calculated member, right?
In your scenario, you needn't to achieve this requirement by using MDX. You can use a named query on your data source view. A named query is a SQL expression represented as a table. In a named query, you can specify an SQL expression to select rows and columns
returned from one or more tables in one or more data sources. So in you scenario, you can use your query on the DSV, and then use the modified table to create a dimension.
http://msdn.microsoft.com/en-IN/library/ms175683.aspx
Regards,
Charlie Liao
TechNet Community Support -
New calculated member based on existing measure and a dimension value
Hi
I’m trying to create a new calculated member in my cube based on an existing measure and a dimension value.
I can do it easily in DSW but I want to do it as a Calculated Member in Calculations tab from my cube.
I have a dimension called Product in which one attribute is UOM (unit of measure) and a measure called Quantity. The relationship with the fact table is “Regular”.
For each product we have a unit of measure and an associated quantity measure:
Product Name
UOM Quantity
Product 1
Km
50
Product 2
Kg
60
Product 3
Kw
25
Product 4 L
15
Product 5 T
1.5
Total 151.5
The calculated member I want to create is “Kw” and has to contain the value from Quantity measure when Product.UOM is “kW” and should look like this:
Product Name
UOM Quantity
Kw
Product 1
Km
50
Product 2
Kg
60
Product 3
Kw
25
25
Product 4 L
15
Product 5 T
1.5
Total 151.5
25
So far I tried using the MDX with “IIF” or “Case” but with no results.
What statement I should use in this case?
Thank you.Hi Cees,
Thank you for your answer.
I never used yet the “Scope” statement and yet it’s an elegant solution.
I use it as in your example:
CREATE
MEMBER CURRENTCUBE.[Measures].[Kw]
AS NULL,
FORMAT_STRING =
VISIBLE = 1 ,
ASSOCIATED_MEASURE_GROUP =
'TR Other';
Scope [Measures].[Kw];
Scope [Product].[UOM].[kW];
This = [Measures].[Quantity];
End
Scope;
End
Scope;
…and the calculations are solid…with one exception: when I took out UOM from the query there are no more any resuts:
Product Name Quantity Kw
Total
It’s only working
if using UOM in the query.
I also thought that a
tulpe might be another solution as:
([Measures].[Quantity],[Product].[UOM].&[kW])
On this last one I’ve got the expected results with one exception: when I use UOM in the query all the other UOM values are listed each one of them
having the [Kw] measure calculation value.
Product Name UOM Quantity Kw
Product 1 Km
50
Product 2 Kg
60
Product 3 Km
25 25
Product 3 Kg
25 25
Product 3 Kw
25 25
Product 3 L
25 25
Product 3 T
25
25
Product 4 L
15
Product 5 T
1.5
Total 151.5
25
…and without UOM in the query I have what I’m expected:
Product Name Quantity
Kw
Product 1 50
Product 2 60
Product 3 25
25
Product 4
15
Product 5
1.5
Total 151.5
25
Maybe we can work together to find a solution.
Thank you,
Oks -
Calculated member not displaying
I have a calculated member that has a case statement with many many when clauses. I have included a part of the code below. But when a member doesn't exists in the "Beginning Buildings" calculated member doesn't appear in the cube as a measure.
If I comment out the lines where the member doesn't exists then I can see the calculated member in the cube.
So on the code below if I comment out the first when clause that has [FEB Estimate] in the Edition dimension I can see the calculated member in the cube. The Edition dimension doesn't have this member anymore but since is in a CASE statement it should
not find it still display the member.
CREATE MEMBER CURRENTCUBE.[Measures].[Beginning Buildings]
AS
case
when [Dim Edition].[Editions].CurrentMember is [Dim Edition].[Editions].[Qtr].&[FEB Estimate]&[1]
then SUM([Dim Edition].[Editions].[Month].&[Year12 Actuals]&[4]&[12], [Measures].[base Buildings In Inventory])
when [Dim Edition].[Editions].CurrentMember is [Dim Edition].[Versions].[Qtr].&[Year13 Budget]&[1]
then SUM([Dim Edition].[Editions].[Month].&[Year12 Actuals]&[4]&[12], [Measures].[base Buildings In Inventory])
else
SUM([Dim Edition].[Editions].Prevmember, [Measures].[base Buildings In Inventory])
end
FORMAT_STRING
= "#,##0",
VISIBLE
= 1, DISPLAY_FOLDER = 'Building';maybe I didn't explain it clearly but say I have this
case
when [Dim
Edition].[Editions].CurrentMember
is [Dim Edition].[Editions].[Qtr].&[FEB
Estimate]&[1]
then SUM([Dim
Edition].[Editions].[Month].&[Year12
Actuals]&[4]&[12],
[Measures].[base
Buildings In Inventory])
when [Dim
Edition].[Editions].CurrentMember
is [Dim Edition].[Versions].[Qtr].&[Year13
Budget]&[1]
then SUM([Dim
Edition].[Editions].[Month].&[Year12
Actuals]&[4]&[12],
[Measures].[base
Buildings In Inventory])
else
SUM([Dim Edition].[Editions].Prevmember,
[Measures].[base
Buildings In Inventory])
end
the calculated measure doesn't this play
but if I have this
case
when [Dim
Edition].[Editions].CurrentMember
is [Dim Edition].[Editions].[Qtr].&[FEB
Estimate]&[1]
then SUM([Dim
Edition].[Editions].[Month].&[Year12
Actuals]&[4]&[12],
[Measures].[base
Buildings In Inventory])
else
SUM([Dim Edition].[Editions].Prevmember,
[Measures].[base
Buildings In Inventory])
end
the calculated measure displays.
Why is that?
I have another cube that has the same type of case statement and it displays even though some case statements are not meet. -
Running Total of a Calculated Member
Hi Friends ,
Need help in calculating the Running Total of a calculated member . I am using the below Query to calculate but it is not showing correct Values.
Query :
WITH
set
[FUNCTIONAL BENEFITS]
as
ORDER(
[FUNCTIONAL BENEFITS].[FUNCTIONAL BENEFITS].children,[Measures].[ANNUAL UNIT CASES WEIGHTED VALUE]
,DESC)
member AUCWEIGHT as
[Measures].[ANNUAL UNIT CASES WEIGHTED VALUE],
FORMAT_STRING='##0.0'
member
[Running Total]
AS
SUM({null:[FUNCTIONAL BENEFITS].[FUNCTIONAL BENEFITS].CurrentMember},[Measures].[ANNUAL UNIT CASES WEIGHTED VALUE]),
FORMAT_STRING='##0.0'
MEMBER [Measures].[AUCWV_PRCT] AS
([Running Total]/[Measures].[TotalSuM])*100,
FORMAT_STRING='##0.0'
member [CummalativePercent] as
(SUM({null:[FUNCTIONAL BENEFITS].[FUNCTIONAL BENEFITS].currentmember},[Measures].[AUCWV_PRCT]))
SELECT {
AUCWEIGHT,[Running Total],
[Measures].[TotalSuM],[Measures].[AUCWV_PRCT],[CummalativePercent]}on columns,
NON EMPTY ([FUNCTIONAL BENEFITS])
DIMENSION PROPERTIES PARENT_UNIQUE_NAME ON rows
FROM [RRMiningDS1_CUBE]
Output :
DiMENSION
AUCWEIGHT
RunningTotal
TotalSum
AUCWV_PRCT
CUMMULATIVEPERCENT
CORRECTCUMMULATIVEPERCENT
A
62605.4
661634.6
1345632.2
49.2
1271.2
49.2
B
38587.9
425278.7
1345632.2
31.6
545.5
80.8
C
35894.5
370057.9
1345632.2
27.5
485.2
108.3
D
30246.4
48345.3
1345632.2
3.6
4.9
111.9
The CUMMALITIVEPERCENT is coming wrong .
I have mentioned the Correct CummulativePercent. as it should be the Running sum of AUCWV_PRCT i.e
49.2+31.6+27.5+3.6=111.9
Please help . where i am making the mistake
Thanks
Rakesh k DharHi R,
It might be as simple as adding solve_order = 99 to the cumulative calc. This tells the formula engine to do the cumulative calculation after the %.
Richard -
MDX Calculated Member With Multiple Conditions
I need to create a calculated member in my cube that spans multiple dimensions. A current calculated member looks like this:
[Employee Hours Category].[Utilization Category].[NON-PTO], [Measures].[Employee Hours]
This calculated member returns all the hours an employee worked that are not PTO.
I need to select employee hours but with multiple conditions:
- [DIM BILL STATUS][Bill Status] equals 0
- [Employee Hours Time Category].[Time Category] equals "Client Facing"
- [DIM PROJECT].[Client] isn't like "Olson"
I know this is probably pretty easy, but I'm horrible with MDX!
Thank you!!
A. M. RobinsonThank you...
Your answer looks good but I was actually able to figure out most of it, but still looking how to incorporate a FILTER into the MDX. I would like to FILTER like this:
FILTER ([DIM Project].[Client].[Client].Members ,
NOT InStr([DIM Project].[Client].CurrentMember.MEMBER_NAME, "Olson")
Heres the MDX I have so far that is working fine:
([Employee Hours Time Category].[Time Category].&[Client Facing],
[DIM BILL STATUS].[Bill Status ID].&[1], [Measures].[Employee Hours])
Do you just wrap the whole MDX in the filter, and if so, how would that be formatted?
A. M. Robinson -
Cross Tab with Calculated Member Fails in BO Enterprise
Hello,
I have a report (Crystal Reports 2008) that I created using a cross tab, with a calculated member field. This report runs fine on my desktop, but fails when published to Crystal Enterprise (Server 2008).
When scheduled, the instance history states Crystal Reports: Print Engine Error
When I remove the calculated member from the cross tab, it runs fine.
Has anyone come across this and if so, how did you resolve it? I believe this is a brand new feature in Crystal Reports 2008 - is it not supposed within Enterprise?
Thank you for your assistance.Root Cause: I had built my report in Crystal Reports 2008 on the latest Service Pack/Fix Packs (which addressed the issue of calculated member). My Crystal Reports SERVER 2008 was on a lower version.
I opened a message with SAP support and they were unable to tell me how to apply service packs to my Server. They then pretty much abandoned my question, so below is what I came up with on my own to fix the issue.
There are no specific service packs/ hot fixes for Crystal Reports SERVER 2008, so I had to:
1) install Crystal Reports V0 on my CRS 2008 machine
2)Install all Service Pack/Fix Packs available for Crystal Reports 2008 (even SP1, even though all SAP documentation tells you not to do this, it is required before you can install SP2)
3) Reboot Server
If you do the same thing as me, just a warning that installing the Crystal Reports SPs will break InfoView/CMC until you apply them all and re-boot. -
Difference Between Calculated Member and Embedded summary
Hi,
Can anyone explain me the difference between the Calculated Member and Embedded summary. Please also clarify when to use which one.
The issue I am having a crosstab report displaying sales revenue for product over the years.
I have my years in columns, product in rows and sales revenue in summarized field. There are 10 products in my report. Its static as of today.
I have to group the first 4 products and display the sub total over the years. Similarly I have to group the last 6 products and display the sub total over the years in the cross tab.
I have to display a column next to the sales revenue having the percentage contribution by the product to that group that I have created earlier.
How to achieve the same.
Thanks and Regards,
Subbu SPlease re-post if this is still an issue to the Crystal Report Design Forum or purchase a case and have a dedicated support engineer work with you directly
-
I'm using SQL Server 2012. I have noticed that commenting out calculated member formulas in BIDs (like even just 10 lines of formula) can cause BIDs to throttle all the CPU and become unresponsive for minutes. What could be the cause of that?
Hi Lee,
According to your description, you get high CPU usage when commenting out the calculated member formulas. Right?
With your information, we are not sure this is a MDX Query performance issue or the BIDS issue. We suggest you optimize your MDX query and diagnose the Formula Engine performance. Please refer to the links below:
Query Performance Tuning in Microsoft Analysis Services: Part 2
Analysis Services Query Performance Top 10 Best Practices
If possible, please post some screenshots or detail information about calculated member formulas so that we can have some deep analysis.
Best Regards,
Simon Hou
Simon Hou
TechNet Community Support -
Using calculated member based upon existence of one or more currentmembers
I'd like to use a calculated member - using the same definition- where the measure is based upon one dimension if that has been selected for use, or another dimension if that has been selected
e.g with pseudocode
WITH member [Measures].[Total Usage] AS
' IF EXISTS ([Date A].currentmember) THEN SUM([Date A].members, [Measures].[X])
ELSE
IF EXISTS ([Date B].currentmember) THEN SUM([Date A].members, [Measures].[X]) '
It may sound odd to some ( possibly) - but I have a front end which is generating MDX and I can only really control the calculated member definition.
Regards
johnnieHi
I am not sure of your front end tool but in general, all generic calculated measures are possible with AXIS function. In your case sample MDX will be like
MEMBER [Measures].[Generic SUM] AS
iif( IsEmpty(Axis(0).Item(0)),
null,
iif( Axis(1).Item(0).Item(0).Hierarchy.CurrentMember.Level.Ordinal = 0,
Axis(0).Item(0),
Sum(Axis(1).Item(0).Item(0).Hierarchy.CurrentMember,
Axis(0).Item(0)
If need to further details, have a look at
https://bipassion.wordpress.com/2013/10/06/mdx-generic-averages/
Prav -
When creating a date time dimension using the dimension wizard and generate schema wizard, i would like to be able to change the owning schema from dbo to something else. The field is greyed out and I am unable to change it.
Is it possible to change the owning schema when generating datetime dimensions in the datasource?Hi rkbjr,
Thank you for your question.
I am currently looking into this issue and will give you an update as soon as possible.
Thank you for your understanding and support.
Thanks,
Bin Long
TechNet Subscriber Support
If you are TechNet Subscription user and have
any feedback on our support quality, please send your feedback here.
Bin Long
TechNet Community Support -
How to display a percentage sign in calculated member column?
Hello all,
in my report I have a calculated member column whose value is determined by follwing value formula:
if CurrentColumnIndex - 2 = 1 then
If GridValueAt(CurrentRowIndex, CurrentColumnIndex-3, CurrentSummaryIndex) = 0 then
0
else
(GridValueAt(CurrentRowIndex, CurrentColumnIndex-1, CurrentSummaryIndex)/
GridValueAt(CurrentRowIndex, CurrentColumnIndex-3, CurrentSummaryIndex)) * 100
else
If GridValueAt(CurrentRowIndex, CurrentColumnIndex-5, CurrentSummaryIndex) = 0 then
0
else
(GridValueAt(CurrentRowIndex, CurrentColumnIndex-1, CurrentSummaryIndex)/
GridValueAt(CurrentRowIndex, CurrentColumnIndex-5, CurrentSummaryIndex))*100
Returned is a numeric value and it is being correctly displayed in calculated member column. As the value should represent percentage, I need to display a % sign after every value.
How would I achieve this? I have seen a thread here in the discussion where approach with a formula and DisplayString function is mentioned - but there are no details how this could be achieved....
The crosstab in question looks like this:
Calculated Member is based on "REV_TOTAL" group column.
I also attached the .rpt file (renamed to .txt for upload)
Many thanks in advance,
MarinHello Raghavendra,
thanks for the quick reply.
Unfortunately it is not as easy at it seems - calculated member column is not showing in report designer and I can not apply the suggested approach with formatting toolbar...
The column only shows here (right click on table -> "Advanced Calculations" -> "Calculated Member...") and there is no possibility to format it directly:
Any other suggestions?
Many thanks,
Marin -
What indexes are created when we check dimension as line item.
What indexes are created when we check dimension as line item.
and also What indexes are created when we check dimension as high cardinality.
Where can i see that information in the system.
Answers are highly appreciated.
Regards
KunalHi,
Line item means it does not have any dimension table.
High Cardinality means that the dimension is to have a large number of instances (that is, a high cardinality). Also, it is very important to indentify the line item dimension properly. E.g. Sales Order number, this will have the exact number of entries as the fact table entries. Hence, this can be created as a line item dimension. If you are not sure of high cardinality never select that. Activate this function when the dimension has is at least 10%- 20% the size of the fact table (in terms of the number of records). <b>In this case, B tree indices are created instead of bitmap indices.</b>. By default it is BITMAP but with high cardinality it is B-Tree indexing.
Hope this helps.
PB -
CR 2011 - calculated member in cross tab
Hello,
I have created a cross tab in my report and added a calculated member. I have created a formula for all my rows because by default the value of the calculated member was "0". Now I wanted to add a new row to my report. The value in the calculated member now is not "0" but empty. How can I access the formula workshop now?
Can anybody help?
Thanks and regards,
Juleif you right click on the cross-tab > go to Advanced Calculations > Calculated Member > click on the one that you want to edit and press the Edit Value Formula button
cheers,
jamie
Maybe you are looking for
-
Unable to import with Sony HDV
I am using the Sony HDV 1080 recorder Model HDR-HC5. I have tried every possible setting, read hours worth of forums, read the user manuals and Googled everything I can think of but I can't get Final cut pro 7.0.1 to log and capture or even see my ca
-
Package has multiple "SMS Distribution Manager" entries on DP it is not published to.
I have an issue with packages seeming to deploy to DPs they are not being published to. We have an aging SCCM 2007 system, which is currently being wound down, so we can migrate to Config Manager 2012. The 2007 system currently has 3 servers acting a
-
Adobe Reader 10 download error
When trying to download Adobe Reader 10 I receive an error at the end of the download that Adobe Reader 8.3 is using some of the files that are to be modified and must be closed. I have tried to delete 8.3 and don't see it in my program files any lo
-
Usually, we can attach any file as an attachment within our outgoing e-mail. But, recently, we have no opportunity to send any file in the attachment. No any other detail information can be submitted at this moment.
-
Feature suggestions for Lightroom 3
Hi team, Here's a quick summary of some ideas for LR3. Not sure how late in the dev cycle you guys are (we've seen one public beta so far, I would expect 2 or 3 before you go RTM, and features have not yet been frozen according to my reading): * Per