sql server - MDX to get First Sales Amount -
I am currently trying to use calculated members to return sales amounts to a customer. I am using some code which has changed a bit by looking at different blogs, but I have been facing some problems in favor of such methods which are conforming to the result set.
I am trying to make several calculated members, one for me to return the date of the first order of a particular product. I would like to take that date right now and will return the sale of that product the same day. This is where I am currently running into a problem, whenever I put a date axis in the equation, unless it is at the level of the hierarchy, the work of the current member, at whatever level and some inconsistencies Will create.
Currently what I have
[remedy] with the member. [DaysToDate] as COUNT (Zero: [Date]. [Financial] .CURRENTMEMBER Member [Measures] [Hadasse] AS IIF ([remedy] = [, Product Sales] = 0, Zero, [Measure]. [Desatododet ] Member [Measures] [Minadata] AS Min (Zero): [Date]. [Financial] .CURRENTMEMBER, [Measures]] Member [Measures] [First Salade] AS IIF (ISMPTI [Measure]. [Minadet]), Tap, [date]. [Financial]. [Day] .mbs.imem ([remedy] [mean das]) [. NAME] SELECT {[remedy]. [Dzedododet], [remedy]. [Hudcell], [remedy ]. [Minateet], [Sub I] From [Sales and Marketing] [Customer Code] From 1 [Sales Team] [Customer]]. [Customer Service] From 1 to [Sales and Marketing] This code will work if I use Backyard For the day level, we have put a WHERE class on our day (which is our final process time) but if I say that the financial quarter, or place on the column, which is level one level from day to day, instead of the present day quarters Based on the current members are counted and in Gives the wrong day to the problem [ITAL] in First Salade.
I am looking for a way to implement these calculations for working mostly on day-to-day basis, because someone Whatever the level of opposition to the level, the last question.
Any help would be greatly appreciated.
I do not answer your whole question, but when you end up saying that you Mostly, you are looking for a way to force a calculated member to use the "day" level of your hierarchy, so I think it should be done for you. This is a technique I have used in the past.
Descendant as member number ([date]. [Financial]. September, 4, self) .emem (0). Value This formula first appears on your calendar, and navigates to the top of the hierarchy (this formula has SELF ). Then it navigates below a specified level. I have four levels in my calendar, but you can be different, so you will need to adjust it if it is. This is a set, but you can use the first member .emem (0) , assuming that your calendar has been ordered in specific fashion. . Value is not necessary, but it helps in testing because it allows you to define yourself as a member of this formula.
Comments
Post a Comment