Performancepoint cascading filter connection formula in MDX - ssas

I have dimension with hierarchy A - B and a time dimension.
I have made 3 different filters from that dimension in Performancepoint 2010, to use as cascading filters.
Cascading works fine, but sometimes dimension members are valid depending on the time dimension and cascading filters will give many "empty" members.
Ie. Jan 2010 only B1,B2 and B3 show measures, others members (B4,B5..) show empty.
How i can connect time dimension to cascading filters so it will only show the valid members at that current time?

I got it using NonEmptyCrossjoin - MDX function.
This function returns a set that contains the cross product of one or more sets, excluding empty tuples and tuples without associated fact table data.

Related

TABLEAU Totals not matching what's in view

I've been dealing with this issue in various ways throughout my time with this dataset in Tableau.
As you can see, the Total count of properties for each city is including properties that have been successfully filtered out of view. Why? The dyn.RANKED Profitable Investments (grouped) variable on the Filter shelf is an attempt to double down on the same as the first line of the Calculated Field - to ignore the unwanted properties in each city. The view ignores them, but the totals do not.
If the Watershed Property pill is removed from the Rows shelf, then the dyn.NumProps_in_City results shown on the table are each the same as the Totals you see here (i.e., despite the first line of the calculated field, properties that do not meet that opening condition are being counted)...despite the view with the Watershed pill knowing not to show them.
Also if the Watershed Property pill is removed from the Rows shelf, then the dyn.RANKED Profitable Investments (grouped) variable on the Filter shelf suddenly only has one category to choose from (i.e., 'INVEST') if you go to edit the filter. Which would be great since that's the category I care about, but not if the counts are including things that are not in that category despite the filter.
Messing around with Include, Exclude, and Fixed in the calculated field doesn't seem to work here since I can't figure out how to get around various aggregate/non-aggregate and/or ATTR errors no matter where I place them. Plus, my incorrect counts are not suffering from an LOD issue - the LOD is correct - it's an issue of not consistently filtering out the unwanted rows at the desired LOD.
Please advise!
Thanks,
Christian
It seems that dyn.Ranked calculated field calculates the value prior to filtering. This may happen if you have used any LOD calculations in the syntax.
Simply right click such fields on filters shelf and click add to context. This will cause LOD calculations to calculate after the filtering.
see this link, the context filters are above the LOD calculations, in order of precedence; but measure filters are below the LOD calcs. Therefore if measures are used as filters, these have to be added to context so that their order of precedence is above such calculations

How to show dimension members for which there are no values in fact in SSAS Multi-Dimensional?

I have two tables in my Ticket Management Application, "ExpositionPeriods" and "OrganisedVisits".
ExpositionPeriods - Defines the periods for which tickets can be purchased.
OrganisedVisits - Stores the tickets purchased information.
In the example below, we have 5 periods available, and tickets have been purchased for 2 of the periods.
The customer wants a report which shows "Number of visitors against each available period". That means if, for any period which doesn't have a visitor, the report should show "0" for that period. Something like this.
So far so good. Since the production database is humongous (~500 GB), it is not advisable to report on this database directly. Things turn to be challenging when I create an OLAP cube out of this schema and try to achieve the same report functionality in the cube. It seems the cube actually performs an action similar to SQL INNER JOIN as opposed to a LEFT OUTER JOIN and hence I do not see those Periods for which there are no tickets sold.
Is this how SSAS actually behaves? Am I missing out any particular setting that will indicate the SSAS engine to process the cube in a different manner so as to include the missing periods as well? Please note, end customers don't have access to MDX/DAX scripts, they can only use the cube by drag-drop measure and dimensions like in Excel pivot table.
In your image the browser is carrying out a non empty on rows on the date dimension. If you want to show the dates with no visitors then select the option to show empty cells.
You can define such scope in "calculations" as
SCOPE
([Measures].[Visitors]);
THIS=IIF(ISEMPTY([Measures].[Visitors]),0,[Measures].[Visitors]);
END SCOPE;
So you have zeros instead of nulls and side effect. You or customer can't hide empty cells, cause now it's not empty enough.

Filter SET by currentMember.MemberCaption

I have a SET of members of some dimension, let's say [Dim].[Dim].[Dim]. Then I wrote a query that returns all the elements from this dimension for 2016 year of some measure, let's say there are 5 of such.
The next step that I want to make is to find first one member in this dimension with the same name (as CurrentMember in row) but for 2015 year. As result, I want to calculate some measure with regards to 2015-member, not 2016's.
So the problem is in scope - I can't GENERATE such set because CurrentMember's function scope will be equal to GENERATE's scope so I am unable to extract actual current member that is on row now and for which I want to find "same previous by name" members.
Am I able to do this with plain MDX or should I go with some workaround like finding such "same" elements in t-sql view and making child-parent relations in cube by hand? The second approach I think is very undesirable and ugly.
Thanks.
Is there a reason you can't just use .PrevMember on the Time (Year, I guess) dimension?
WITH MEMBER [Measures].[SomePrevYearCalculation]
AS ([Time].[Year].CurrentMember.PrevMember,[Measures].[AMeasure])
SELECT
{[Measures].[AMeasure],[Measures].[Some2015Calculation]} ON 0,
[[Some complicated dimension stuff]] ON 1
FROM Cube
WHERE [Time].[Year].[2016]
Or are you dealing with a dimension that has multiple duplicate Names at leaf-level, so that you can't match the 2015 to 2016 figures by the actual dimension member?

Managing PerformancePoint Filters With Slowly Changing Dimensions

Just a bit of background info:
I have dimension table which uses SCD2 to track user changes in our company (team changes, job title changes etc) See example below:
I've built an Analysis Services Cube and created all the necessary hierarchy's for the dimensions and it works well when navigating and drilling down through the fact table.
The problem I have is with the filters on the PerformancePoint dashboard. As I'm using the User Dimension table with it's multiple instances of users it's showing duplicates up in the list. I can understand why as the surrogate ID is being referenced on the Dimension. But if I choose the first instance of the A-team I will see all their sales for a particular period and if I choose the second instance I will see all their sales for a different period.
What is the best way to handle this type of behavior? Ideally I'd like to see a distinct list of teams in alphabetical order and when I choose the team name it shows all of their data over time.
I've considered using MDX query filters but I'd like to see if there's anything I haven't thought about.
I realise this isn't an easy and quick question but any help would be appreciated!
The answer was simple after having a trawl through my User Dimension table on the Cube.
Under my user dimension I added 2 duplicate attributes to my attributes list ("Team Filter" is a copy of "Team", "User Filter" a copy of "User Name") these will be used only for filtering the dashboard.
Under the attribute properties for each duplicate I then set AttributeHierarchyOptimizedState to "Not Optimized", I also set their AttributeHierarchyVisible to false as I'd shown the two duplicate attributes in the hierarchy window in the middle.
Deploy your Cube to the server and go in to PerformancePoint. Create a new MDX Filter (this image shows the finished filter)
This is the code I used, it only shows dimension members which have a fact against them (reduces the list a considerable amount) and by using allmembers at the dimension it also gives me the option to show "All" at the top of the list.
Deploy the new filters and now you can see the distinct list of users and teams, works perfectly and selects every instance (regardless of the SCD2 row)

How the aggregation and calculated members work as combined to produce output in SSAS Cube

I am creating a POC on the SSAS. Ultimate goal is to be able to perform any kind of the calculation either ad hoc calculation or pre calculated with good performance. Existing solutions is based on the SQL server but due to the performance issues with huge data facing issues.
I need some insight upon how the Cube works to give faster outputs. I have created date dimensions with hierarchy Year-> Semester-> Quarter -> Month -> Week -> Date. Several other dimensions are linked with the date dimension. My cube has almost 10 to 15 dimension which have several role playing dimensions.There are almost two to three dates in every fact table.
How the Cube aggregates the data based on the dimensions linked to the facts?
Does it internally creates all the combination of the dimension values and saves the fact aggregate data internally?
Here i have attached an MDX script which hase YTD,MTD,QTD Calculated Measures.[Measures].[Value] measure has to be added based on the function applied on the date dimension. Does SSAS internally sum up the [Measures].[Value] for various hierarchy of the date/Other dimension/s? What exactly SSAS does to provide the final value fast?
Our system has large number of the fields whose calculation depends on the value selected by the end user to the number has to be calculated at run time by aggregating some other measures. Does SSAS is fast to provide the Calcualted Member output by using the internally aggregated values generated during the cube processing?
With Member [Measures].[YTDValue] as ([Measures].[Value],
OpeningPeriod([Rundate].[Calendar].[Date],[Rundate].[Calendar].CurrentMember.Parent.Parent.Parent.Parent.Parent))
Member [Measures].[QTDValue]
as ([Measures].[Value],OpeningPeriod([Rundate].[Calendar].[Date],[Rundate].[Calendar].CurrentMember.Parent.Parent.Parent))
Member [Measures].[MTDValue]
as ([Measures].[Value],OpeningPeriod([Rundate].[Calendar].[Date],[Rundate].[Calendar].CurrentMember.Parent.Parent))
SELECT
{
[Measures].[YTDValue],
[Measures].[QTDValue],
[Measures].[MTDValue],
} on 0,
{
[Rundate].[Calendar].[Date].Members
} ON 1
FROM
(
select
{
[Rundate].[Calendar].[Date].&[2015-01-09T00:00:00]
} on 0
from [Cube_Sample]
)