logo
down
shadow

Calculated measure/dimension


Calculated measure/dimension

By : Mike
Date : October 17 2020, 11:12 PM
wish helps you I should have mentioned that I am using Mondrian/MySQL. I came to similar conclusion but found a way to create a new degenerate dimension using an SQL key expression (so I don't actually need to add column to table):
code :


Share : facebook icon twitter icon
Dimension Member as Calculated Measure in MDX

Dimension Member as Calculated Measure in MDX


By : thelastlombax
Date : March 29 2020, 07:55 AM
seems to work fine If I understand your problem correctly, something along this line should do the trick (of course you'd have to use the proper level, hierarchy and cube names):
code :
   with
    member [Measures].[DirectorTemp] as topcount([Salesperson].[Salesperson].members,1,([Measures].[Credited Value],[Credit Type].[Director],[Customer].currentmember)).item(0).properties("Caption")   
    member [Measures].[Director] as iif([Measures].[DirectorTemp] = [Salesperson].UnknownMember.properties("caption"), null, [Measures].[DirectorTemp])
    member [Measures].[ManagerTemp] as topcount([Salesperson].[Salesperson].members,1,([Measures].[Credited Value],[Credit Type].[Manager],[Customer].currentmember)).item(0).properties("Caption") 
    member [Measures].[Manager] as iif([Measures].[ManagerTemp] = [Salesperson].UnknownMember.properties("caption"), null, [Measures].[ManagerTemp])


    select
        {[Measures].[Director],[Measures].[Manager],[Measures].[Value]} on 0,
        {[Customer].members} on 1
    from MyCube
Calculated Measure using dimension

Calculated Measure using dimension


By : Petr Hradil
Date : March 29 2020, 07:55 AM
Hope that helps Wouldn't the DISTINCTCOUNT function be the one to use here? Creating a distinct count of Vendors could then be used in this query and elsewhere.
code :
WITH MEMBER [Test]
AS
DISTINCTCOUNT([Vendor].[Vendor].[Vendor])
MDX calculated measure for dimension member

MDX calculated measure for dimension member


By : Salah Ud Din
Date : March 29 2020, 07:55 AM
help you fix your problem To answer your second question: You would create two measures, and if you create Offers value first and position Efficiency after it in the calculation script, then you can just use the first one in the second.
You cannot use WITH in the calculation script, but only in SELECT statements. That is probably the reason why you get an error message (your first question).
code :
CREATE MEMBER CURRENTCUBE.[Measures].[Efficiency] 
AS 
IIF([Measures].[Offers Value]=0, 0
, 1 - ([Measures].[Offers value], [Is Ordered].[Is Ordered - Status].&[0])
  / ([Measures].[Offers Value]))
,FORMAT_STRING="PERCENT",
, VISIBLE = 1;
SSAS Dimension attribute as Calculated Measure

SSAS Dimension attribute as Calculated Measure


By : Tom Melograno
Date : March 29 2020, 07:55 AM
should help you out The best approach would be to create a measure group from the dimension table (in BIDS, go to cube designer, tab "Cube Structure", right-click the cube object in the Measures list, and select "New Measure Group", select your dimension table). BIDS will generate some measures, and you can remove all but two: the one based on your numeric attribute (I will call it "YourSummedAttrib" to have a name to refer to below), and the count measure. The aggregate function for the measure "YourSummedAttrib" will probably be "sum", leave that as it is.
Then, create a calculated measure which divides "YourSummedAttrib" by the count measure, which gives the average. Finally, if you have tested everything, make the two measures "YourSummedAttrib" and the count measure invisible before you give the cube to the users, as they only need to see the average, which is the calculated measure.
MDX calculated measure by dimension value

MDX calculated measure by dimension value


By : edead
Date : March 29 2020, 07:55 AM
I hope this helps you . I have to filter the measure value by a value in a the article group dimension. , Try this:
code :
CREATE MEMBER CURRENTCUBE.[Measures].[FilteredAmount]
AS ([Measures].[SalesAmount], [Article Group].[Service].&[0]);
-- Service "0" = not service
shadow
Privacy Policy - Terms - Contact Us © bighow.org