I am trying to create a calculated member that will give me the minimum value of another measure excluding a dimension.
So, for example, I have a Product and Location dimension. I have a measure that gives me the first time that product was every sold at that location. I want another measure that will give the first time that product was sold at any location (so same dimension usage except I'm not taking the location into account).
How do I go about this?
Would I use something like currentmember for the dimensions except the location dimension?
Thanks
Try it:
([Location].[Location].[All],[Measures].[MinDate])
[Location].[Location].[All] will help you to ignore the current location and scan through all locations.
Related
I can't find a way to get a "snapshot" of data through a cube.
I have an inventory saved by date.
It looks like this:
My measure that shows inventory is called "Stock" and aggregation mode is "LastNonEmpty"
When I filter on a date, I always get the same result.
I understand why. But I can't find a formula for calculation measure and I'm not at ease with MDX queries.
Moreover, I correctly get a total of 8 on Week 39, but if I filter on the specific size "40", I will get a total of 1. This one is correctly excluded in total!
My aim is to have a snapshot of inventory that shows the last value including empty value and depending on other filters.
When I pick "Week 35" I want to have inventory on week 35. On week 38 I want to get an only value that exists. If I pick weeks from 35 to 38, I want the results of last week.
"week" is a hierarchy, there is detail until day under this hierarchy
Thanks for your help.
Take a look at Last Ever Non empty by Chris Webb.
I have a Fact table with the following rows
When I process my cube I want results like this :
However when procession my cube I get the following results:
I have fee rate (hourly rate) as a measure but it is summing the values when LineID is the same (see value highlighted in red), even though the dates and start times are different.
How can I change my Hourlyrate measure to only display the unique value and not a summation? I have tried changing the AggregationFunction to None but this gives me null values.
You've done a poor job of explaining your requirements and your issue.
Anyway, I would try changing the AggregationFunction for your Coll Fee Rate measure to Max. That will show the highest underlying value.
Try changing AggregationFunction for "Fee Rate" measure to AverageOfChildren
for more details
https://msdn.microsoft.com/en-us/library/ms365396.aspx
I managed to solve this by creating a Dimension table containing the fee rates and then used to this determine the rate
I need to build a named set with mdx which tells me for a whole year what which are the large records. I cannot share my data, so I'll use a sales example.
All sales reps. need to enter their sales numbers in a application and on top of that database there is a cube configured. One of the goals is to find weird sales behaviour in this cube. This would mean a sales rep that is selling 100k every year, suddenly only sells 30k a year.
I have created a dynamic set that allows me to filter on this by using a calculated member named 'qualifies'. This qualifies is defined like this. (Diff is calculated before)
CREATE MEMBER Currentcube.qualifies AS iif(abs([Diff]) > 50000, 1, NULL),DISPLAY_FOLDER = 'Check big difference';
So this check can be used to filter all the sales reps that have a difference of 50k sales.
When I add aonther filter to my cube, for example region, the 50k threshold will never be exceeded, because no body has more than 50k sales in one region. I want to make the 50K dynamic based on my where clause in my filter.
My question is, is this possible? I'm fairly new to MDX so if this is an easy question, please forgive me. I have been trying lots of different scenario's but none gave a wanted result. I have been looking online, but this specific scenario hasn't passed in my search results.
I have a dimension list of Product Codes and a measure called ACV in my cube. I need to be able to calculate the maximum ACV value for each product code.
I have got as far as the calculation below but that returns the sum of ACV for all products.
MAX([Products].[Product Code].[Product Code].Members, [Measures].[ACV])
I'd be grateful for input on how to resolve my problem.
Thanks!
If you want the maximum evaluated semiadditively by the grain of your model designed in the data source view, you should add a new measure (based on the same source field as the ACV measure) to your cube add set its AggregationFunction property to Max. More on aggregation functions in SSAS.
As you can see there is a Total added automatically. The Birth Date and Full Name are not hierarchy attributes. They are both from same dimension. I want to show birth date and full name. How to get rid of the Total?
One way to do this is to Compute a calculated member on your DSV. You can name it for example Birth-Name.
To do this
Open your Data Source View
Right click on the dimension name
New name calculation
Name: Birth-Name
expression: birthday+' '+fullname
Add the new field to your dimension
Preview the cube with the new calced member and money measure
In this way you can view your data and the total of all of them together
There are other ways to do this also, but this is the simplest I could think of. The total cannot be totally removed from the cube, as this is what it's real job is. To make aggregations of data.